From 02821f18865f2575ee63bdaecede43d0bac58b64 Mon Sep 17 00:00:00 2001 From: Antonin Boyon <22009544@etu.unicaen.fr> Date: Wed, 10 Feb 2021 12:38:25 +0100 Subject: [PATCH] fonction getMoves pour clone et saut --- src/othello/State.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/othello/State.java b/src/othello/State.java index 70655da..97aa46b 100644 --- a/src/othello/State.java +++ b/src/othello/State.java @@ -47,7 +47,7 @@ public class State { if (this.board[y+deltaY][x+deltaX]==0) { moves.add(new Pair(new Point(y, x), new Point(y+deltaY, x+deltaX))); } - if(deltaX == 0 ^ deltaY == 0){ + if(this.board[y+deltaY][x+deltaX]!=0){ if(this.board[y+2*deltaY][x+2*deltaX] == 0) moves.add(new Pair(new Point(y, x), new Point(y+2*deltaY, x+2*deltaX)));