Reset streak if don't continue
This commit is contained in:
parent
b364a6cfab
commit
41df6c113f
@ -401,6 +401,7 @@ static bool act_on_btn(wordle_state_t *state, const uint8_t pin) {
|
|||||||
display_playing(state);
|
display_playing(state);
|
||||||
else {
|
else {
|
||||||
reset_board(state);
|
reset_board(state);
|
||||||
|
state->streak = 0;
|
||||||
display_streak(state);
|
display_streak(state);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -496,7 +497,7 @@ void wordle_face_activate(movement_settings_t *settings, void *context) {
|
|||||||
wordle_state_t *state = (wordle_state_t *)context;
|
wordle_state_t *state = (wordle_state_t *)context;
|
||||||
#if WORDLE_USE_DAILY_STREAK
|
#if WORDLE_USE_DAILY_STREAK
|
||||||
uint32_t now = get_day_unix_time() ;
|
uint32_t now = get_day_unix_time() ;
|
||||||
if (state->prev_day <= (now + (60 *60 * 24))) state->streak = 0;
|
if (now >= (state->prev_day + (60 *60 * 24))) state->streak = 0;
|
||||||
if (state->curr_day != now) reset_all_elements(state);
|
if (state->curr_day != now) reset_all_elements(state);
|
||||||
#endif
|
#endif
|
||||||
state->using_random_guess = false;
|
state->using_random_guess = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user