Skip to content

Commit 6cfe187

Browse files
committed
Merge branch 'develop' of https://github.com/AbstractPlay/gameslib into develop
2 parents 4508a8e + c91e953 commit 6cfe187

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

locales/en/apgames.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4179,7 +4179,7 @@
41794179
"OCCUPIED": "Only one frog per suit space.",
41804180
"OFF_BOARD": "Frogs must be placed on locations with suits, at home, or at the Excuse.",
41814181
"OFFSIDES": "Please click on your desired suit space, not the informational icons on the top row.",
4182-
"PIECE_NEXT": "Click on a frog to move it forward or backwards.",
4182+
"PIECE_NEXT": "Click on a frog to move it.",
41834183
"PLACE_NEXT": "Click on a new location for your frog.",
41844184
"TOO_HOPPY": "You may not make more than {{count}} moves on your turn.",
41854185
"TOO_EARLY_FOR_REFILL": "Please submit your refill request before making your remaining moves.",

src/games/frogger.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,9 +1110,14 @@ export class FroggerGame extends GameBase {
11101110
result.move = move;
11111111
} else {
11121112
if (result.autocomplete !== undefined) {
1113-
//Internal autocompletion:
1114-
const automove = result.autocomplete;
1113+
//Internal autocompletion.
1114+
let automove = result.autocomplete;
11151115
result = this.validateMove(automove) as IClickResult;
1116+
//A double auto-completion may be needed.
1117+
if (result.autocomplete !== undefined) {
1118+
automove = result.autocomplete;
1119+
result = this.validateMove(automove) as IClickResult;
1120+
}
11161121
result.move = automove;
11171122
} else {
11181123
result.move = newmove;
@@ -1346,7 +1351,7 @@ export class FroggerGame extends GameBase {
13461351
//Internal autocompletion:
13471352
const targets:string[] = subIFM.forward ? cloned.getNextForwardsForCard(subIFM.from, subIFM.card!) : this.getNextBack(subIFM.from);
13481353
if (targets.length === 1) {
1349-
result.autocomplete = m + targets[0] + (subIFM.forward ? "/" : ",");
1354+
result.autocomplete = m + targets[0] + (subIFM.forward ? "/" : "");
13501355
}
13511356

13521357
return result;
@@ -1476,8 +1481,6 @@ export class FroggerGame extends GameBase {
14761481
}
14771482

14781483
this.results = [];
1479-
this._highlight = [];
1480-
this._points = [];
14811484

14821485
let marketEmpty = false;
14831486
let refill = false;
@@ -1496,10 +1499,16 @@ export class FroggerGame extends GameBase {
14961499
const moves = m.split("/");
14971500

14981501
for (let s = 0; s < moves.length; s++) {
1502+
1503+
//Really only need these on a final partial submove
1504+
//but it's simpler to do it every submove.
1505+
this._highlight = [];
1506+
this._points = [];
1507+
14991508
const submove = moves[s];
15001509
if ( submove === "" )
15011510
continue;
1502-
1511+
15031512
const subIFM = this.parseMove(submove);
15041513

15051514
if (subIFM.refill)

0 commit comments

Comments
 (0)