[refactor] Replace hardcoded values with build flags and cleanup duplicates.
- Add #ifndef guards for pin defines duplicated between platformio.ini and main.cpp - Use DEFAULT_LOOK_AHEAD, DEFAULT_BRIGHTNESS, DEFAULT_IDLE_TIMEOUT, DEMO_RESET_PAUSE build flags instead of hardcoded magic numbers - Add WIFI_SSID build flag for configurable access point name - Remove unused build flags (BRIGHTNESS, IDLE_TIMEOUT, DEBOUNCE_DELAY) - Remove progressive difficulty / evolution feature (getDynamicPly) - Replace goto with structured control flow in performAiMove - Deduplicate checkGameEnd win/draw branches - Implement blunder mode: configurable chance (%) to pick a random column, preserving instant win/block detection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-3
@@ -12,14 +12,12 @@ build_flags =
|
||||
-D ENC_SW=2
|
||||
-D SENSITIVITY=4
|
||||
-D SHOW_BORDER=0
|
||||
-D BRIGHTNESS=25
|
||||
-D IDLE_TIMEOUT=45000
|
||||
-D DEMO_RESET_PAUSE=20000
|
||||
-D DEBOUNCE_DELAY=50
|
||||
-D DEFAULT_LOOK_AHEAD=8
|
||||
-D DEFAULT_BRIGHTNESS=25
|
||||
-D DEFAULT_IDLE_TIMEOUT=45
|
||||
-D MAX_GAME_LOG=100
|
||||
-D WIFI_SSID=\"Connect4\"
|
||||
-D WIFI_PASSWORD=\"youlose4\"
|
||||
lib_deps =
|
||||
fastled/FastLED @ 3.9.12
|
||||
|
||||
Reference in New Issue
Block a user