implement automatic graph traversal along shortest path to solution

This commit is contained in:
2026-02-25 02:58:30 +01:00
parent fd58f217c6
commit 271902ab1f
7 changed files with 62 additions and 23 deletions

View File

@ -16,8 +16,8 @@ constexpr int MENU_HEIGHT = 200;
// Menu
constexpr int MENU_PAD = 5;
constexpr int BUTTON_PAD = 20;
constexpr int MENU_ROWS = 3;
constexpr int BUTTON_PAD = 12;
constexpr int MENU_ROWS = 4;
constexpr int MENU_COLS = 3;
// Camera Controls

View File

@ -17,6 +17,7 @@ public:
int block_add_x;
int block_add_y;
bool mark_path;
bool mark_solutions;
bool connect_solutions;
@ -24,7 +25,7 @@ public:
InputHandler(StateManager &_state)
: state(_state), hov_x(-1), hov_y(-1), sel_x(0), sel_y(0),
has_block_add_xy(false), block_add_x(-1), block_add_y(-1),
mark_solutions(false), connect_solutions(false) {}
mark_path(false), mark_solutions(false), connect_solutions(false) {}
InputHandler(const InputHandler &copy) = delete;
InputHandler &operator=(const InputHandler &copy) = delete;

View File

@ -68,6 +68,8 @@ public:
auto NextPreset() -> void;
auto NextPath() -> void;
auto FillGraph() -> void;
auto UpdateGraph() -> void;