]> git.earman.xyz Git - sensor-watch.git/commitdiff
Able to turn the expanded dict on and off with a variable
authorDavid Volovskiy <devolov@gmail.com>
Sat, 17 Aug 2024 10:22:24 +0000 (06:22 -0400)
committerDavid Volovskiy <devolov@gmail.com>
Tue, 3 Sep 2024 20:08:12 +0000 (16:08 -0400)
movement/watch_faces/complication/wordle_face.c
movement/watch_faces/complication/wordle_face.h

index 9b1db1b85d1e1c923dc08492ee5805880f554945..2b991e37c964410cb2f358285f5fe9074d207aa2 100644 (file)
@@ -67,11 +67,14 @@ static const char _legal_words[][WORDLE_LENGTH + 1] = {
     "SCOOP", "EASEL", "LOONS", "CONIC", "SPANS", "SPIES", "PRIOR", "SALSA", "SELLS", 
     "PILLS", "RISES", "RARES", "SNEER", "SOILS", "ARENA", "CASES", "CANAL", "SAILS", 
     "LASSO", "COCOA", "ERROR", "CALLS",
+#if (USE_EXPANDED_DICT != 1)
 };
 // These are words that'll never be used, but still need to be in the dictionary for guesses.
 // Top 100K most common words from Wiktionary https://gist.github.com/h3xx/1976236
 // Number of words found: 469
 static const char _expanded_words[][WORDLE_LENGTH + 1] = {
+#endif
+#if (USE_EXPANDED_DICT != 0)
     "PARIS", "APRIL", "SPAIN", "EINEN", "ASCII", "EINER", "SEINE", "AINSI", "ALICE", 
     "ALLES", "ALORS", "EINES", "ALLER", "PEINE", "PARCE", "CELLE", "CLARA", "ELLES", 
     "ELLEN", "OLISI", "ALLEN", "ISAAC", "APRES", "CROIS", "SANOI", "PASSE", "ELSIE", 
@@ -125,8 +128,13 @@ static const char _expanded_words[][WORDLE_LENGTH + 1] = {
     "NOONE", "SEPPI", "OPPIA", "SEALE", "LIPPI", "PELAS", "COCOS", "PLACA", "CONOR", 
     "LANCA", "OSASI", "ALOIS", "NAIRN", "PIENO", "SPASS", "SAONE", "ALNAR", "CARIA", 
     "PIENA",
+#endif
 };
 
+#if (USE_EXPANDED_DICT == 1)
+static const char _expanded_words[][WORDLE_LENGTH + 1] = {};
+#endif
+
 static const uint16_t _num_unique_words = 155;  // The _legal_words array begins with this many words where each letter is different.
 static const uint16_t _num_words = (sizeof(_legal_words) / sizeof(_legal_words[0]));
 static const uint16_t _num_expanded_words = (sizeof(_expanded_words) / sizeof(_expanded_words[0]));
index b137512657146df4735d2f56663607a5eca6d535..1860984fff1dcb856a38faf8d2ee9ba14d05c0af 100644 (file)
 #define WORDLE_MAX_ATTEMPTS 6
 #define USE_DAILY_STREAK false
 
+/*  USE_EXPANDED_DICT
+ *  0 = don't use it at all (saves 2.8KB of ROM)
+ *  1 = Include the expanded dict in answers
+ *  2 = Only include it in the dict for guessing, but it's never an answer
+*/
+#define USE_EXPANDED_DICT 2
+
 typedef enum {
     WORDLE_LETTER_WRONG = 0,
     WORDLE_LETTER_WRONG_LOC,