mirror of
https://codeberg.org/hkzlab/TK2048.git
synced 2025-12-26 00:22:18 +11:00
Add score info in start/end boxes
This commit is contained in:
parent
10dc668d9e
commit
2816b20cae
3 changed files with 38 additions and 12 deletions
10
src/main.c
10
src/main.c
|
|
@ -50,11 +50,8 @@ __task int main(void) {
|
|||
|
||||
while(1){ // Outer loop
|
||||
moves_count = 0;
|
||||
|
||||
// Check if we have a new high-score
|
||||
if (score > hi_score) hi_score = score;
|
||||
|
||||
// TODO: Draw a screen and wait for a key press here here
|
||||
|
||||
// Draw a screen and wait for a key press here here
|
||||
BELL1();
|
||||
ddraw_endgame_box(done, score, hi_score);
|
||||
while(!read_any_key()) {
|
||||
|
|
@ -63,6 +60,9 @@ __task int main(void) {
|
|||
BELL1();
|
||||
clear_display_buffers(); // Clear display again
|
||||
|
||||
// Check if we have a new high-score from a previous game
|
||||
if (score > hi_score) hi_score = score;
|
||||
|
||||
// Reset the game, calculate the initial score depending on which tiles we randomly get
|
||||
score = reset_game();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue