File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -497,7 +497,9 @@ export class FroggerGame extends GameBase {
497497 let points : string [ ] = [ ] ;
498498 const card = Card . deserialize ( cardId ) ;
499499 if ( card === undefined ) {
500- throw new Error ( `Could not deserialize the card ${ cardId } in getNextForwardsForCard (from ${ from } ).` ) ;
500+ //If you can see this, the front end is trying to generate moves
501+ // for the next player from his hidden hand cards. Be forgiving...
502+ return points ;
501503 }
502504 const suits = card . suits . map ( s => s . uid ) ;
503505
@@ -984,6 +986,7 @@ export class FroggerGame extends GameBase {
984986 let to ;
985987 const cardObj = Card . deserialize ( card ) ;
986988 if ( cardObj === undefined ) {
989+ //Already handled the hidden case, so something else is wrong.
987990 throw new Error ( `Could not deserialize the card ${ card } in randomMove.` ) ;
988991 }
989992
You can’t perform that action at this time.
0 commit comments