Skip to content
Snippets Groups Projects
Commit afa4a7fa authored by Matyáš Latner's avatar Matyáš Latner
Browse files

Merge branch 'feature-shootingrange' into 'devel'

feature-shootingrange -> devel

Fixed game crashing bug.

See merge request !115
parents 88a38fdb 676c3a97
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ public class ShootingRangeResultResolver implements GameDefinition.GameResultRes
@Override
public AbstractTablexiaGame.GameResult getGameResult(Game game) {
int[][] CUPS = {Properties.CUPS_EASY, Properties.CUPS_MEDIUM, Properties.CUPS_HARD};
int gameScore = Integer.valueOf(game.getGameScore(Properties.SCORE_TOTAL));
int gameScore = Integer.valueOf(game.getGameScore(Properties.SCORE_TOTAL, "0"));
int gameDificultyOrdinal = game.getDifficulty().getDifficultyNumber() -1;
if (gameScore > CUPS[gameDificultyOrdinal][2]) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment