Skip to content

Commit 6e4fa69

Browse files
committed
Arimaa: Add move counts
1 parent e01360e commit 6e4fa69

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

locales/en/apgames.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3530,7 +3530,8 @@
35303530
"NOPASS": "You may not make a move that does not change the board state (no passing).",
35313531
"NOPIECE": "Trying to place a piece you don't have in your hand: {{piece}}.",
35323532
"NOT_ADJ": "Pieces may only move one space orthogonally.",
3533-
"PARTIAL": "You may continue making moves, or click Complete Move to end your turn.",
3533+
"PARTIAL_one": "You may make {{count}} more move, or click Complete Move to end your turn.",
3534+
"PARTIAL_other": "You may make {{count}} more moves, or click Complete Move to end your turn.",
35343535
"PARTIAL_MOVE": "Select the destination.",
35353536
"PARTIAL_PLACE": "Click an empty cell to place the piece.",
35363537
"PARTIAL_PLAY": "Continue placing your pieces.",

src/games/arimaa.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,8 +936,9 @@ export class ArimaaGame extends GameBase {
936936
}
937937
// if the number of moves are < max moves, then 0
938938
else if (steps.length < maxMoves) {
939+
const remaining = maxMoves - steps.length;
939940
complete = 0;
940-
message = i18next.t("apgames:validation.arimaa.PARTIAL");
941+
message = i18next.t("apgames:validation.arimaa.PARTIAL", {count: remaining});
941942
}
942943
// otherwise we're good
943944
else {

0 commit comments

Comments
 (0)