aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-08-12 10:57:33 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-08-12 10:57:33 +0100
commit3e1c7be361aff6803393b010bbb68bd7b2480ddb (patch)
treeec249ec0d7ac0acb028db0827987ead45f86d4e8
parent43503cfa510a7f7e650efccaac266d7cc6657a5d (diff)
downloadgold-mine-run-3e1c7be361aff6803393b010bbb68bd7b2480ddb.tar.gz
gold-mine-run-3e1c7be361aff6803393b010bbb68bd7b2480ddb.zip
Update hiscore
-rw-r--r--src/game.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game.c b/src/game.c
index 67c6ffe..0acd9d9 100644
--- a/src/game.c
+++ b/src/game.c
@@ -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;