From 6f0a34bfb761d965bd961dc1f880b84e35f9959f Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Wed, 20 Nov 2019 10:05:59 -0800 Subject: Understanding symmetry, but nothing else. --- Source/Solver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Solver.cpp') diff --git a/Source/Solver.cpp b/Source/Solver.cpp index a8710a2..c0b35ef 100644 --- a/Source/Solver.cpp +++ b/Source/Solver.cpp @@ -27,10 +27,10 @@ void Solver::SolveLoop(Puzzle& p, int x, int y, std::vector& solutions) if (cell.undefined) return; if (cell.gap != Cell::Gap::NONE) return; - if (p.sym == Puzzle::Symmetry::NONE) { + if (p.symmetry == Puzzle::Symmetry::NONE) { if (cell.color != Cell::Color::NONE) return; // Collided with ourselves p.grid[x][y].color = Cell::Color::BLACK; // Otherwise, mark this cell as visited - p.sequence.emplace_back(Pos{x, y}); + p.sequence.emplace_back(x, y); } else { /* // Get the symmetrical position, and try coloring it @@ -71,7 +71,7 @@ void Solver::SolveLoop(Puzzle& p, int x, int y, std::vector& solutions) // Tail recursion: Back out of this cell p.grid[x][y].color = Cell::Color::NONE; p.sequence.pop_back(); - if (p.sym != Puzzle::Symmetry::NONE) { + if (p.symmetry != Puzzle::Symmetry::NONE) { /* auto sym = p.GetSymmetricalPos(x, y); p.grid[sym.x][sym.y].color = Cell::Color::NONE; -- cgit 1.4.1