Add reset key combo

This commit is contained in:
hkz 2025-07-26 12:27:24 +02:00
commit 9b7646d434
3 changed files with 19 additions and 4 deletions

View file

@ -99,6 +99,11 @@ __task int main(void) {
done = step_game(STEP_RIGHT);
ddraw_direction_arrows(ARROW_RIGHT);
break;
case K_CTRL_R:
BELL1();
score = 0; // We'll reset the score
done = -1;
break;
default:
continue; // Do nothing, loop again
}
@ -106,9 +111,9 @@ __task int main(void) {
// Increase the count of moves we made
moves_count++;
// If we have won, break out of this loop
// If we have won, or we got a reset request, break out of this loop
if(done) {
score += WIN_SCORE_BONUS;
score += (done > 0) ? WIN_SCORE_BONUS : 0;
break;
}