Refactor: replace hardcoded unit array size 7 with nd::MAX_UNITS
- Replace hardcoded with in NetDeck.ino (8 occurrences) - Add to nd_layout.h - Update test expectations in unit_tests.h and integration_tests.h from units[6] to units[7] to match the new reinforcement slot indexing This enables supporting more than 7 units in the future.
This commit is contained in:
@@ -28,6 +28,7 @@ constexpr int HUD_X = 0, HUD_Y = 192, HUD_W = 320, HUD_H = 48;
|
||||
constexpr int TILE = 8;
|
||||
constexpr int TILE_COLS = VIEW_W / TILE; // 40
|
||||
constexpr int TILE_ROWS = VIEW_H / TILE; // 24
|
||||
constexpr int MAX_UNITS = 20;
|
||||
|
||||
// Sub-net node icons are 12x12.
|
||||
constexpr int NODE_ICON = 12;
|
||||
|
||||
Reference in New Issue
Block a user