Merge pull request 'Test complet de la fonction isLegal() de AvalamBoard' (#24) from tests into master

Reviewed-on: #24
This commit was merged in pull request #24.
This commit is contained in:
2026-02-05 16:16:53 +01:00
4 changed files with 149 additions and 5 deletions

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;