Skip to content
Merged
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
5 changes: 4 additions & 1 deletion src/games/frogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,9 @@ export class FroggerGame extends GameBase {
let points: string[] = [];
const card = Card.deserialize(cardId);
if (card === undefined) {
throw new Error(`Could not deserialize the card ${cardId} in getNextForwardsForCard (from ${from}).`);
//If you can see this, the front end is trying to generate moves
// for the next player from his hidden hand cards. Be forgiving...
return points;
}
const suits = card.suits.map(s => s.uid);

Expand Down Expand Up @@ -984,6 +986,7 @@ export class FroggerGame extends GameBase {
let to;
const cardObj = Card.deserialize(card);
if (cardObj === undefined) {
//Already handled the hidden case, so something else is wrong.
throw new Error(`Could not deserialize the card ${card} in randomMove.`);
}

Expand Down