]> git.earman.xyz Git - sensor-watch.git/commitdiff
hard mode btn changed; logic changed on daily streak so if puzzle wasn't started...
authorDavid Volovskiy <devolov@gmail.com>
Thu, 29 Aug 2024 01:38:09 +0000 (21:38 -0400)
committerDavid Volovskiy <devolov@gmail.com>
Tue, 3 Sep 2024 20:11:54 +0000 (16:11 -0400)
movement/watch_faces/complication/wordle_face.c
movement/watch_faces/complication/wordle_face.h

index daaac2098895fa7f1a0ce5638905aa19017952b2..8381cec4f1fd30a891d99fde8f3f3eda70f40618 100644 (file)
@@ -495,8 +495,9 @@ void wordle_face_activate(movement_settings_t *settings, void *context) {
     wordle_state_t *state = (wordle_state_t *)context;
 #if WORDLE_USE_DAILY_STREAK != 0
     uint32_t now = get_day_unix_time();
-    if (now >= (state->day_last_game_started + (60 *60 * 24)) &&
-        (is_playing(state) || WORDLE_USE_DAILY_STREAK == 2)) {
+    uint32_t one_day = 60 *60 * 24;
+    if ((WORDLE_USE_DAILY_STREAK == 2 && now >= (state->day_last_game_started + (2*one_day)))
+        || (now >= (state->day_last_game_started + one_day) && is_playing(state))) {
         state->streak = 0;
         reset_board(state);
     }
@@ -543,6 +544,11 @@ bool wordle_face_loop(movement_event_t event, movement_settings_t *settings, voi
             display_letter(state, true);
             break;
         case EVENT_LIGHT_LONG_PRESS:
+            if (state->curr_screen < SCREEN_PLAYING) {
+                state->skip_wrong_letter = !state->skip_wrong_letter;
+                show_skip_wrong_letter_indicator(state->skip_wrong_letter, state->curr_screen);
+                break;
+            }
             if (state->curr_screen != SCREEN_PLAYING) break;
             get_prev_letter(state->position, state->word_elements, state->known_wrong_letters, state->skip_wrong_letter);
             display_letter(state, true);
@@ -565,11 +571,6 @@ bool wordle_face_loop(movement_event_t event, movement_settings_t *settings, voi
             }
             break;
         case EVENT_ALARM_LONG_PRESS:
-            if (state->curr_screen < SCREEN_PLAYING) {
-                state->skip_wrong_letter = !state->skip_wrong_letter;
-                show_skip_wrong_letter_indicator(state->skip_wrong_letter, state->curr_screen);
-                break;
-            }
             if (state->curr_screen != SCREEN_PLAYING) break;
             display_letter(state, true);
             state->position = get_prev_pos(state->position, state->word_elements_result);
index b035f140b7fc1b61f2929d6690554675d885a9e8..1b9a7fb78ba5e0d185c8f7c295bac2d0bb1c073d 100644 (file)
@@ -46,7 +46,8 @@
  *        Else: Next screen
  *    Light Hold
  *        If Playing: Previous letter
- *        Else: None
+ *        Else: Toggle Hard-Mode. This is skipping over letters that have been confirmed
+ *              to not be in the word (indicated via 'H' in the top-right)
  *
  *    Alarm Press
  *        If Playing: If WORDLE_USE_RANDOM_GUESS is set and Light btn held and 
@@ -56,8 +57,7 @@
  *        Else: Next screen
  *    Alarm Hold
  *        If Playing: Previous position
- *        Else: Toggle Hard-Mode. This is skipping over letters that have been confirmed
- *              to not be in the word (indicated via 'H' in the top-right)
+ *        Else: None
  * 
  * Note: Actual Hard Mode in Wordle game is "Any revealed hints must be used in subsequent guesses"
  *       But that came off as clunky UX on the Casio. So instead it only removes unused letters from the keyboard