Continue test now blinks

This commit is contained in:
David Volovskiy 2024-08-18 22:30:41 -04:00
parent 1868f8446a
commit ce31db3712

View File

@ -307,11 +307,17 @@ static void display_title(wordle_state_t *state) {
watch_display_string("WO WordLE", 0); watch_display_string("WO WordLE", 0);
} }
static void display_continue_result(bool continuing, uint8_t subsecond) {
char buf[2];
char result = subsecond % 2 ? ' ' : (continuing ? 'y' : 'n');
sprintf(buf,"%c", result);
watch_display_string(buf, 9);
}
static void display_continue(wordle_state_t *state) { static void display_continue(wordle_state_t *state) {
char buf[7];
state->curr_screen = SCREEN_CONTINUE; state->curr_screen = SCREEN_CONTINUE;
sprintf(buf, "Cont %c", state->continuing ? 'y' : 'n'); watch_display_string("Cont ", 4);
watch_display_string(buf, 4); display_continue_result(state->continuing, 0);
} }
static void display_streak(wordle_state_t *state) { static void display_streak(wordle_state_t *state) {
@ -446,7 +452,7 @@ static bool act_on_btn(wordle_state_t *state, const uint8_t pin) {
break; break;
case BTN_LIGHT: case BTN_LIGHT:
state->continuing = !state->continuing; state->continuing = !state->continuing;
display_continue(state); display_continue_result(state->continuing, 0);
break; break;
} }
return true; return true;
@ -571,6 +577,9 @@ bool wordle_face_loop(movement_event_t event, movement_settings_t *settings, voi
case SCREEN_WIN: case SCREEN_WIN:
display_win(state, event.subsecond); display_win(state, event.subsecond);
break; break;
case SCREEN_CONTINUE:
display_continue_result(state->continuing, event.subsecond);
break;
default: default:
break; break;
} }