diff --git a/main/steps/step5.cpp b/main/steps/step5.cpp index 6c84d41..99b6008 100644 --- a/main/steps/step5.cpp +++ b/main/steps/step5.cpp @@ -2,6 +2,8 @@ static const char *TAG = "step5"; +static const int TIMES_TO_SOLVE = 9; + static std::random_device rd; static std::mt19937 gen(rd()); static std::uniform_int_distribution<> puzzle_dist(0, 7); @@ -59,7 +61,7 @@ void step5(void) { } const int INDICATOR_RED[6] = {20, 0, 0, 10, 10, 5}; - const int INDICATOR_GREEN[6] = {0, 0, 10, 5, 0, 5}; + const int INDICATOR_GREEN[6] = {0, 0, 10, 5, 0, 7}; const int INDICATOR_BLUE[6] = {0, 10, 0, 0, 5, 5}; static std::uniform_int_distribution<> led_number_dist(0, 21); @@ -78,7 +80,7 @@ void step5(void) { clean_bomb(); int solved_puzzles = 0; - while (solved_puzzles < 3) { + while (solved_puzzles < ) { lcd_set_cursor(&lcd, 1, 1); int puzzle = puzzle_dist(gen); @@ -88,7 +90,7 @@ void step5(void) { switch (puzzle) { case 0: { lcd_print(&lcd, "Clear"); - set_module_time(15000); + set_module_time(30000); start_module_timer(); std::vector indicator_options = all_leds; @@ -131,7 +133,7 @@ void step5(void) { } case 1: { lcd_print(&lcd, "Blank"); - set_module_time(30000); + set_module_time(40000); start_module_timer(); std::uniform_int_distribution<> on_indicators_dist(16, 21); @@ -139,7 +141,7 @@ void step5(void) { std::vector indicator_options = all_leds; const int INDICATOR_RED[6] = {20, 0, 0, 10, 10, 5}; - const int INDICATOR_GREEN[6] = {0, 0, 10, 5, 0, 5}; + const int INDICATOR_GREEN[6] = {0, 0, 10, 5, 0, 7}; const int INDICATOR_BLUE[6] = {0, 10, 0, 0, 5, 5}; set_unique_leds_random_color(indicator_options, indicators_num, INDICATOR_RED, INDICATOR_BLUE, INDICATOR_GREEN); @@ -190,7 +192,7 @@ void step5(void) { break; } case 2: { - set_module_time(30000); + set_module_time(25000); start_module_timer(); std::uniform_int_distribution<> lit_led_dist(0, 1); @@ -316,7 +318,7 @@ void step5(void) { } case 3: { lcd_print(&lcd, "Nothing"); - set_module_time(20000); + set_module_time(25000); start_module_timer(); const int COLOR_RED[5] = {0, 20, 10, 0, 0}; @@ -378,7 +380,7 @@ void step5(void) { } case 4: { lcd_print(&lcd, "Blink"); - set_module_time(30000); + set_module_time(35000); start_module_timer(); // buttons @@ -525,13 +527,13 @@ void step5(void) { } case 5: { lcd_print(&lcd, "Ummm"); - set_module_time(30000); + set_module_time(35000); start_module_timer(); std::uniform_int_distribution<> indicator_number_dist(0, 5); - const int INDICATOR_RED[4] = {0, 20, 10, 10}; - const int INDICATOR_GREEN[4] = {10, 0, 5, 5}; + const int INDICATOR_RED[4] = {0, 20, 10, 0}; + const int INDICATOR_GREEN[4] = {10, 0, 5, 0}; const int INDICATOR_BLUE[4] = {0, 0, 0, 10}; // green, red, yellow, blue @@ -602,7 +604,7 @@ void step5(void) { // red, purple, blue, white, green, yellow const uint8_t COLORS_RED[6] = {20, 10, 0, 5, 0, 10}; - const uint8_t COLORS_GREEN[6] = {0, 0, 0, 5, 10, 5}; + const uint8_t COLORS_GREEN[6] = {0, 0, 0, 7, 10, 5}; const uint8_t COLORS_BLUE[6] = {0, 10, 10, 5, 0, 0}; int button_colors[4]; @@ -698,7 +700,7 @@ void step5(void) { } case 7: { lcd_print(&lcd, "What"); - set_module_time(40000); + set_module_time(50000); start_module_timer(); std::uniform_int_distribution<> math_number_dist(1, 9); @@ -853,7 +855,7 @@ void step5(void) { } case 8: { lcd_print(&lcd, "Plink"); - set_module_time(15000); + set_module_time(40000); start_module_timer(); std::uniform_int_distribution<> indicator_number_dist(0, 4);