From b7223a5cee4e9939933fa9a96f69bec519c1d8a8 Mon Sep 17 00:00:00 2001 From: Jose Srifi Date: Tue, 2 Apr 2019 16:54:14 +0200 Subject: [PATCH 1/3] update des attributs des pieces --- src/piecesEchiquier/Piece.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/piecesEchiquier/Piece.java b/src/piecesEchiquier/Piece.java index 9ef7878..ce751b1 100755 --- a/src/piecesEchiquier/Piece.java +++ b/src/piecesEchiquier/Piece.java @@ -5,7 +5,7 @@ public class Piece { //variables - private String couleur; + private boolean couleur; private String emplacement; private char lettre = '.'; private boolean enVie = true; @@ -21,11 +21,11 @@ public class Piece { // constructeur - public Piece(String c, String emp,char l) + public Piece(boolean couleur, String emp,char l) { - couleur = c; - emplacement = emp; - lettre = l; + this.setCouleur(couleur); + this.emplacement = emp; + this.lettre = l; } // gets & sets @@ -60,11 +60,11 @@ public class Piece { /////////// - public String getCouleur() { + public boolean isCouleur() { return couleur; } - public void setCouleur(String couleur) { + public void setCouleur(boolean couleur) { this.couleur = couleur; } From 111caf24d7973d02c75f2b2153511f012d0d1a24 Mon Sep 17 00:00:00 2001 From: aa700867 Date: Tue, 2 Apr 2019 16:57:11 +0200 Subject: [PATCH 2/3] SAVE roi.java avant pull --- src/piecesEchiquier/Roi.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/piecesEchiquier/Roi.java b/src/piecesEchiquier/Roi.java index 2f3a989..3c68073 100755 --- a/src/piecesEchiquier/Roi.java +++ b/src/piecesEchiquier/Roi.java @@ -6,4 +6,10 @@ public class Roi extends Piece { super(c, emp,l); } + public void enEchec() { + int[][] positionCourante; + positionCourante=Piece.getPositionCourante(); + + } + } From cf88454384c78818ad2577b873d52bf80177fc34 Mon Sep 17 00:00:00 2001 From: Jose Srifi Date: Tue, 2 Apr 2019 17:13:37 +0200 Subject: [PATCH 3/3] Update des couleurs from String to boolean --- src/piecesEchiquier/Cavalier.java | 2 +- src/piecesEchiquier/Fou.java | 2 +- src/piecesEchiquier/Reine.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/piecesEchiquier/Cavalier.java b/src/piecesEchiquier/Cavalier.java index fcd02f1..70b27b5 100755 --- a/src/piecesEchiquier/Cavalier.java +++ b/src/piecesEchiquier/Cavalier.java @@ -2,7 +2,7 @@ package piecesEchiquier; public class Cavalier extends Piece { - public Cavalier(String c, String emp,char l) + public Cavalier(boolean c, String emp,char l) { super(c, emp,l); } diff --git a/src/piecesEchiquier/Fou.java b/src/piecesEchiquier/Fou.java index bf590e6..280b496 100755 --- a/src/piecesEchiquier/Fou.java +++ b/src/piecesEchiquier/Fou.java @@ -2,7 +2,7 @@ package piecesEchiquier; public class Fou extends Piece { - public Fou(String c, String emp,char l) { + public Fou(boolean c, String emp,char l) { super(c, emp,l); } diff --git a/src/piecesEchiquier/Reine.java b/src/piecesEchiquier/Reine.java index 917b50d..c1ab3ea 100755 --- a/src/piecesEchiquier/Reine.java +++ b/src/piecesEchiquier/Reine.java @@ -2,7 +2,7 @@ package piecesEchiquier; public class Reine extends Piece { - public Reine(String c, String emp,char l) { + public Reine(boolean c, String emp,char l) { super(c, emp,l); } }