Skip to content

Commit f2b1e32

Browse files
committed
Emergo: first move can't be in center error message
1 parent 0590eb0 commit f2b1e32

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

locales/en/apgames.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3888,6 +3888,7 @@
38883888
"INITIAL_INSTRUCTIONS_play": "Select a stack with your piece on top to move.",
38893889
"INVALID_MOVE_enter": "The move does not appear to be legal. You may not place a piece where it will induce a capture (feeding) unless your opponent is already required to capture.",
38903890
"INVALID_MOVE_play": "The move does not appear to be legal. Capturing is compulsory, and you must capture the most pieces you can.",
3891+
"FIRST_MOVE": "The first move of the game can not be in the center",
38913892
"VALID_PARTIAL": "Select a destination. Capturing is compulsory, and you must capture the most pieces you can.",
38923893
"WHITE_SQUARE": "Pieces may only be placed on the dark squares."
38933894
},

src/games/emergo.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,11 @@ export class EmergoGame extends GameBase {
416416
result.message = i18next.t("apgames:validation.emergo.WHITE_SQUARE");
417417
return result;
418418
}
419+
if (this.currplayer === 1 && inhand[0] === 12 && cell === "e5") {
420+
result.valid = false;
421+
result.message = i18next.t("apgames:validation.emergo.FIRST_MOVE");
422+
return result;
423+
}
419424
}
420425
// otherwise move/capture
421426
else {

0 commit comments

Comments
 (0)