2019-03-20 14:14:48 +01:00
|
|
|
package piecesEchiquier;
|
|
|
|
|
|
|
|
public class Roi extends Piece {
|
2019-05-04 21:08:15 +02:00
|
|
|
private boolean verif=false;
|
2019-03-20 14:14:48 +01:00
|
|
|
|
2019-05-04 21:08:15 +02:00
|
|
|
public Roi(String c,String l, Position pos)
|
2019-04-23 17:30:04 +02:00
|
|
|
{
|
2019-05-04 21:08:15 +02:00
|
|
|
super(c,l,pos);
|
2019-03-20 14:14:48 +01:00
|
|
|
}
|
|
|
|
|
2019-05-03 18:32:02 +02:00
|
|
|
/*
|
2019-05-06 17:27:11 +02:00
|
|
|
public void enEchec(Piece piece, Position position) {
|
|
|
|
boolean[][] mouvementsPossibles;
|
|
|
|
mouvementsPossibles=piece.getMouvementsPossibles();
|
|
|
|
|
2019-05-03 23:53:45 +02:00
|
|
|
positionCourante = super.getEmplacement();
|
|
|
|
|
2019-04-02 16:57:11 +02:00
|
|
|
|
|
|
|
}
|
2019-05-03 18:32:02 +02:00
|
|
|
*/
|
2019-05-06 17:27:11 +02:00
|
|
|
|
2019-05-04 21:08:15 +02:00
|
|
|
public boolean aBouge()
|
|
|
|
{
|
|
|
|
if(this.getIni() != this.getPosition())
|
|
|
|
{
|
|
|
|
verif=true;
|
|
|
|
}
|
|
|
|
if(this.getIni() == this.getPosition() && verif == false)
|
|
|
|
{
|
|
|
|
verif=false;
|
|
|
|
}
|
|
|
|
return verif;
|
|
|
|
}
|
2019-03-20 14:14:48 +01:00
|
|
|
}
|