From 43ba7daf15128d95333bb96acb6f863b941c2001 Mon Sep 17 00:00:00 2001 From: Jose Srifi Date: Tue, 2 Apr 2019 17:38:04 +0200 Subject: [PATCH] Modification des attributs de postion + ajout attribut depart --- src/piecesEchiquier/Piece.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/piecesEchiquier/Piece.java b/src/piecesEchiquier/Piece.java index ce751b1..cb3b9dc 100755 --- a/src/piecesEchiquier/Piece.java +++ b/src/piecesEchiquier/Piece.java @@ -6,9 +6,10 @@ public class Piece { //variables private boolean couleur; - private String emplacement; + private Position emplacement; private char lettre = '.'; private boolean enVie = true; + private Position depart; @@ -21,11 +22,12 @@ public class Piece { // constructeur - public Piece(boolean couleur, String emp,char l) + public Piece(boolean couleur,char l, int X, int Y) { this.setCouleur(couleur); - this.emplacement = emp; this.lettre = l; + this.emplacement.setEmplacement(X, Y); + this.depart.setEmplacement(X, Y); } // gets & sets