Domaine : coup à valider, demi-coups défaits un par un, dés joués

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pierre MARTIN
2026-11-03 07:04:26 +01:00
co-authored by Claude Opus 5.5
parent ce2bd46ec3
commit 2c5278965b
4 changed files with 218 additions and 24 deletions
+3
View File
@@ -42,6 +42,7 @@ async function playerMove(position: PositionId, dice: [number, number], move: st
for (const halfMove of parseHalfMoves(move)) {
assert.equal(await game.playHalfMove(halfMove), true, formatHalfMoves([halfMove]));
}
await game.confirmMove();
return game;
}
@@ -59,6 +60,7 @@ test("un coup simple : un plateau par demi-coup, sans pion frappé", async () =>
for (const halfMove of parseHalfMoves("8/5 6/5")) {
await game.playHalfMove(halfMove);
}
await game.confirmMove();
const steps = await game.lastMoveSteps();
assert.ok(steps !== null);
assert.equal(steps.side, "player");
@@ -121,6 +123,7 @@ test("le coup de l'ordinateur, vu dans sa propre numérotation", async () => {
for (const halfMove of parseHalfMoves("8/5 6/5")) {
await game.playHalfMove(halfMove);
}
await game.confirmMove();
await game.playComputerTurn();
const steps = await game.lastMoveSteps();
assert.ok(steps !== null);