Ajout vérification correspondance du Joueur (Test Ok)

This commit is contained in:
2026-02-05 16:06:03 +01:00
parent dea162182b
commit f43361a48f

View File

@@ -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;