Ajout vérification correspondance du Joueur (Test Ok)
This commit is contained in:
@@ -205,6 +205,7 @@ public class AvalamBoard extends AbstractBoard {
|
||||
Tower dst = grid[xT][yT];
|
||||
if (src == null || dst == null) return false;
|
||||
|
||||
if (p.getPlayer() != getCurrentPlayer()) return false;
|
||||
if (src.getColor() != colorForPlayer(getCurrentPlayer())) return false;
|
||||
if (!areAdjacent(xF, yF, xT, yT)) return false;
|
||||
if (src.getColor() == dst.getColor()) return false;
|
||||
|
||||
Reference in New Issue
Block a user