Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Commit

Permalink
Fixed mistake on save @persistence.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfuchss committed Jul 6, 2017
1 parent 4ea6d86 commit 062093e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private static final class HelperMethods {
static void setHighScore(DataKeySetter dks) {
int newScore = dks.getScore();
int oldScore = (Integer) dks.getDefinition().getData(DataKey.HIGH_SCORE);
if (oldScore < newScore) {
if (oldScore < newScore && dks.getWon()) {
dks.getDefinition().setData(DataKey.HIGH_SCORE, newScore);
}
}
Expand Down

0 comments on commit 062093e

Please sign in to comment.