mark visited and starting states

This commit is contained in:
2026-02-23 14:38:53 +01:00
parent 6698ace0c6
commit 59a4303d62
7 changed files with 35 additions and 15 deletions

View File

@ -14,7 +14,6 @@ private:
Vector3 position;
Vector3 target;
Vector3 target_target;
float distance;
float angle_x;
float angle_y;
@ -28,9 +27,9 @@ private:
public:
OrbitCamera3D()
: camera({0}), position(Vector3Zero()), target(Vector3Zero()),
target_target(Vector3Zero()), distance(CAMERA_DISTANCE), angle_x(0.0),
angle_y(0.0), last_mouse(Vector2Zero()), rotating(false),
panning(false), target_lock(true) {
distance(CAMERA_DISTANCE), angle_x(0.0), angle_y(0.0),
last_mouse(Vector2Zero()), rotating(false), panning(false),
target_lock(true) {
camera.position = Vector3(0, 0, -1.0 * distance);
camera.target = target;
camera.up = Vector3(0, 1.0, 0);

View File

@ -71,8 +71,9 @@ public:
auto UpdateTextureSizes() -> void;
auto DrawMassSprings(const MassSpringSystem &mass_springs,
const State &current_state,
const std::unordered_set<State> &winning_states) -> void;
const State &current_state, const State &starting_state,
const std::unordered_set<State> &winning_states,
const std::unordered_set<State> &visited_states) -> void;
auto DrawKlotski(const State &state, int hov_x, int hov_y, int sel_x,
int sel_y, int block_add_x, int block_add_y,

View File

@ -19,6 +19,7 @@ public:
bool edited = false;
std::unordered_set<State> winning_states;
std::unordered_set<State> visited_states;
public:
StateManager(MassSpringSystem &mass_springs)
@ -52,6 +53,8 @@ public:
auto FindWinningStates() -> void;
auto CurrentGenerator() -> StateGenerator;
auto CurrentWinCondition() -> WinCondition;
};