From fed94934c36adf63254c06569deaa2c6b666a474 Mon Sep 17 00:00:00 2001 From: Manon Date: Thu, 23 May 2019 15:19:16 +0200 Subject: [PATCH] =?UTF-8?q?correction=20pion=20vite=20fait=20+=20reines=20?= =?UTF-8?q?bonnes=20coordonn=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/piecesEchiquier/Echiquier.java | 8 ++++---- src/piecesEchiquier/Pion.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/piecesEchiquier/Echiquier.java b/src/piecesEchiquier/Echiquier.java index ea7a5ca..3b17247 100644 --- a/src/piecesEchiquier/Echiquier.java +++ b/src/piecesEchiquier/Echiquier.java @@ -51,11 +51,11 @@ public class Echiquier { private Fou FouN1 = new Fou("Noir","FN",new Position(3,8)); private Fou FouN2 = new Fou("Noir","FN",new Position(6,8)); - private Reine ReineB1 = new Reine("Blanc","QB",new Position(5,1)); - private Reine ReineN1 = new Reine("Noir","QN",new Position(5,8)); + private Reine ReineB1 = new Reine("Blanc","QB",new Position(4,1)); + private Reine ReineN1 = new Reine("Noir","QN",new Position(4,8)); - private Roi RoiB1 = new Roi("Blanc","KB",new Position(4,1)); - private Roi RoiN1 = new Roi("Noir","KN",new Position(4,8)); + private Roi RoiB1 = new Roi("Blanc","KB",new Position(5,1)); + private Roi RoiN1 = new Roi("Noir","KN",new Position(5,8)); //remplissage de l'echiquier private Piece[][] echiquier = diff --git a/src/piecesEchiquier/Pion.java b/src/piecesEchiquier/Pion.java index 44ebf6d..8623a17 100755 --- a/src/piecesEchiquier/Pion.java +++ b/src/piecesEchiquier/Pion.java @@ -14,7 +14,7 @@ public class Pion extends Piece { { if (p.getPosition().getX()-1 == this.getPosition().getX() || p.getPosition().getX()+1 == this.getPosition().getX()) //Verification si la personne souhaite manger la piece { - if ((this.getCouleur().equals("Blanc") && p.getPosition().getY()-1 == this.getPosition().getY()) || (this.getCouleur() == "noir" && p.getPosition().getY()+1 == this.getPosition().getY())) + if ((this.getCouleur().equals("Blanc") && p.getPosition().getY()-1 == this.getPosition().getY()) || (this.getCouleur() == "Noir" && p.getPosition().getY()+1 == this.getPosition().getY())) { if (p.getNom().equals("..")) {