Modification des attributs de postion + ajout attribut depart

This commit is contained in:
Jose Srifi 2019-04-02 17:38:04 +02:00
parent 55becf8bb1
commit 43ba7daf15

View File

@ -6,9 +6,10 @@ public class Piece {
//variables //variables
private boolean couleur; private boolean couleur;
private String emplacement; private Position emplacement;
private char lettre = '.'; private char lettre = '.';
private boolean enVie = true; private boolean enVie = true;
private Position depart;
@ -21,11 +22,12 @@ public class Piece {
// constructeur // constructeur
public Piece(boolean couleur, String emp,char l) public Piece(boolean couleur,char l, int X, int Y)
{ {
this.setCouleur(couleur); this.setCouleur(couleur);
this.emplacement = emp;
this.lettre = l; this.lettre = l;
this.emplacement.setEmplacement(X, Y);
this.depart.setEmplacement(X, Y);
} }
// gets & sets // gets & sets