GabP404 / MyShelfie-multiplayer-game

Other
1 stars 0 forks source link

CLI: fix crash when no tokens are left on common goal #99

Closed giuseppe-steduto closed 1 year ago

giuseppe-steduto commented 1 year ago

If there are no tokens left on a common goal card, a "-" is printed instead of the number of points of the next token.

Closes #88

How to test:

  1. Try to score both token of a common goal card :), or
  2. in GameController.createTokensCommonGoalCard:
    case 2 -> {
                // Delete these two lines so that there are no tokens on the common goal card already at the start of the game
                tokens.add(new ScoringToken(8, id));
                tokens.add(new ScoringToken(4, id));
            }