diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-08-12 10:57:33 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-08-12 10:57:33 +0100 |
commit | 3e1c7be361aff6803393b010bbb68bd7b2480ddb (patch) | |
tree | ec249ec0d7ac0acb028db0827987ead45f86d4e8 | |
parent | 43503cfa510a7f7e650efccaac266d7cc6657a5d (diff) | |
download | gold-mine-run-3e1c7be361aff6803393b010bbb68bd7b2480ddb.tar.gz gold-mine-run-3e1c7be361aff6803393b010bbb68bd7b2480ddb.zip |
Update hiscore
-rw-r--r-- | src/game.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -599,6 +599,9 @@ void add_score(uint8_t v) score += v; extra_life += v; + if (score > hiscore) + hiscore = score; + if (extra_life >= GAME_EXTRA_LIFE) { extra_life -= GAME_EXTRA_LIFE; |