diff --git a/keyboards/winry/winry25tc/keymaps/lightsout/keymap.c b/keyboards/winry/winry25tc/keymaps/lightsout/keymap.c index 473a9209a7cc..1dbd363520c9 100644 --- a/keyboards/winry/winry25tc/keymaps/lightsout/keymap.c +++ b/keyboards/winry/winry25tc/keymaps/lightsout/keymap.c @@ -117,11 +117,11 @@ void refresh_leds(void) { rgblight_set(); } -#define INITIAL_MOVES 1 +uint8_t initial_moves = 1; void start_game(void) { rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); - for (uint8_t i = 0; i < INITIAL_MOVES; i++) { + for (uint8_t i = 0; i < initial_moves; i++) { do_move(random() % 5, random() % 5); } refresh_leds(); @@ -138,6 +138,7 @@ bool won = false; bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { if (won) { + initial_moves++; won = false; start_game(); } else { diff --git a/keyboards/winry/winry25tc/keymaps/lightsout/readme.md b/keyboards/winry/winry25tc/keymaps/lightsout/readme.md index c63f7dea65c0..4271bff43fd8 100644 --- a/keyboards/winry/winry25tc/keymaps/lightsout/readme.md +++ b/keyboards/winry/winry25tc/keymaps/lightsout/readme.md @@ -1,3 +1,3 @@ # Lights Out game -Implements a "lights out" mode as per https://en.m.wikipedia.org/wiki/Lights_Out_(game) with a single move having been played on start. On completion of the game, the Rainbow Swirl pattern is displayed. If another key is then pressed, the game resets. +Implements a "lights out" mode as per https://en.m.wikipedia.org/wiki/Lights_Out_(game) with a single move having been played on start. On completion of the game, the Rainbow Swirl pattern is displayed. If another key is then pressed, the game resets, with the initial number of moves incremented by one.