Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion locales/en/apgames.json
Original file line number Diff line number Diff line change
Expand Up @@ -4175,7 +4175,7 @@
"OCCUPIED": "Only one frog per suit space.",
"OFF_BOARD": "Frogs must be placed on locations with suits, at home, or at the Excuse.",
"OFFSIDES": "Please click on your desired suit space, not the informational icons on the top row.",
"PIECE_NEXT": "Click on a frog to move it forward or backwards.",
"PIECE_NEXT": "Click on a frog to move it.",
"PLACE_NEXT": "Click on a new location for your frog.",
"TOO_HOPPY": "You may not make more than {{count}} moves on your turn.",
"TOO_EARLY_FOR_REFILL": "Please submit your refill request before making your remaining moves.",
Expand Down
21 changes: 15 additions & 6 deletions src/games/frogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1110,9 +1110,14 @@ export class FroggerGame extends GameBase {
result.move = move;
} else {
if (result.autocomplete !== undefined) {
//Internal autocompletion:
const automove = result.autocomplete;
//Internal autocompletion.
let automove = result.autocomplete;
result = this.validateMove(automove) as IClickResult;
//A double auto-completion may be needed.
if (result.autocomplete !== undefined) {
automove = result.autocomplete;
result = this.validateMove(automove) as IClickResult;
}
result.move = automove;
} else {
result.move = newmove;
Expand Down Expand Up @@ -1346,7 +1351,7 @@ export class FroggerGame extends GameBase {
//Internal autocompletion:
const targets:string[] = subIFM.forward ? cloned.getNextForwardsForCard(subIFM.from, subIFM.card!) : this.getNextBack(subIFM.from);
if (targets.length === 1) {
result.autocomplete = m + targets[0] + (subIFM.forward ? "/" : ",");
result.autocomplete = m + targets[0] + (subIFM.forward ? "/" : "");
}

return result;
Expand Down Expand Up @@ -1476,8 +1481,6 @@ export class FroggerGame extends GameBase {
}

this.results = [];
this._highlight = [];
this._points = [];

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

for (let s = 0; s < moves.length; s++) {

//Really only need these on a final partial submove
//but it's simpler to do it every submove.
this._highlight = [];
this._points = [];

const submove = moves[s];
if ( submove === "" )
continue;

const subIFM = this.parseMove(submove);

if (subIFM.refill)
Expand Down