diff options
Diffstat (limited to 'Source/Solver.cpp')
-rw-r--r-- | Source/Solver.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<Puzzle>& solutions) | |||
27 | if (cell.undefined) return; | 27 | if (cell.undefined) return; |
28 | if (cell.gap != Cell::Gap::NONE) return; | 28 | if (cell.gap != Cell::Gap::NONE) return; |
29 | 29 | ||
30 | if (p.sym == Puzzle::Symmetry::NONE) { | 30 | if (p.symmetry == Puzzle::Symmetry::NONE) { |
31 | if (cell.color != Cell::Color::NONE) return; // Collided with ourselves | 31 | if (cell.color != Cell::Color::NONE) return; // Collided with ourselves |
32 | p.grid[x][y].color = Cell::Color::BLACK; // Otherwise, mark this cell as visited | 32 | p.grid[x][y].color = Cell::Color::BLACK; // Otherwise, mark this cell as visited |
33 | p.sequence.emplace_back(Pos{x, y}); | 33 | p.sequence.emplace_back(x, y); |
34 | } else { | 34 | } else { |
35 | /* | 35 | /* |
36 | // Get the symmetrical position, and try coloring it | 36 | // Get the symmetrical position, and try coloring it |
@@ -71,7 +71,7 @@ void Solver::SolveLoop(Puzzle& p, int x, int y, std::vector<Puzzle>& solutions) | |||
71 | // Tail recursion: Back out of this cell | 71 | // Tail recursion: Back out of this cell |
72 | p.grid[x][y].color = Cell::Color::NONE; | 72 | p.grid[x][y].color = Cell::Color::NONE; |
73 | p.sequence.pop_back(); | 73 | p.sequence.pop_back(); |
74 | if (p.sym != Puzzle::Symmetry::NONE) { | 74 | if (p.symmetry != Puzzle::Symmetry::NONE) { |
75 | /* | 75 | /* |
76 | auto sym = p.GetSymmetricalPos(x, y); | 76 | auto sym = p.GetSymmetricalPos(x, y); |
77 | p.grid[sym.x][sym.y].color = Cell::Color::NONE; | 77 | p.grid[sym.x][sym.y].color = Cell::Color::NONE; |