Skip to content

Commit 78dcb62

Browse files
committed
Merge branch 'develop' of https://github.com/AbstractPlay/gameslib into develop
2 parents cbe4232 + 3587f9a commit 78dcb62

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

locales/en/apgames.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4241,7 +4241,8 @@
42414241
"TOO_HOPPY": "You may not make more than {{count}} moves on your turn.",
42424242
"TOO_EARLY_FOR_REFILL": "Please submit your refill request before making your remaining moves.",
42434243
"TOO_LATE_FOR_BLOCKED": "You do not count as blocked if you've already moved on this turn.",
4244-
"TOO_LATE_FOR_REFILL": "There is no need to force a refill of the draw pool after your third move. It will refill automatically after you submit."
4244+
"TOO_LATE_FOR_REFILL": "There is no need to force a refill of the draw pool after your third move. It will refill automatically after you submit.",
4245+
"VALID_REFILL": "Please submit your move to trigger the refill. You will have {{count}} moves remaining after the refill, as well as the option to pass."
42454246
},
42464247

42474248
"furl": {

src/games/frogger.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,7 @@ export class FroggerGame extends GameBase {
13271327
const cloned: FroggerGame = Object.assign(new FroggerGame(this.numplayers, [...this.variants]), deepclone(this) as FroggerGame);
13281328

13291329
let allcomplete = false;
1330+
let refill = false;
13301331
const moves: string[] = m.split("/");
13311332

13321333
if (moves[moves.length - 1] === "") {
@@ -1403,7 +1404,9 @@ export class FroggerGame extends GameBase {
14031404
result.valid = false;
14041405
result.message = i18next.t("apgames:validation.frogger.NO_CARDS_FOR_REFILL");
14051406
return result;
1406-
}// else refill = true;
1407+
} else {
1408+
refill = true;
1409+
}
14071410
}
14081411

14091412
let complete = false;
@@ -1613,7 +1616,11 @@ export class FroggerGame extends GameBase {
16131616
result.valid = true;
16141617
result.canrender = true;
16151618
result.complete = (allcomplete && moves.length === this.nummoves) ? 1 : 0;
1616-
result.message = i18next.t("apgames:validation._general.VALID_MOVE");
1619+
if (refill)
1620+
result.message = i18next.t("apgames:validation.frogger.VALID_REFILL", {count: 3 - moves.length});
1621+
else
1622+
result.message = i18next.t("apgames:validation._general.VALID_MOVE");
1623+
16171624
return result;
16181625
}
16191626

0 commit comments

Comments
 (0)