summary refs log tree commit diff stats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/Solver.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Source/Solver.cpp b/Source/Solver.cpp index ac660a2..2813027 100644 --- a/Source/Solver.cpp +++ b/Source/Solver.cpp
@@ -32,7 +32,6 @@ void Solver::SolveLoop(Puzzle& p, int x, int y, std::vector<Puzzle>& solutions)
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(x, y); 33 p.sequence.emplace_back(x, y);
34 } else { 34 } else {
35 /*
36 // Get the symmetrical position, and try coloring it 35 // Get the symmetrical position, and try coloring it
37 auto sym = p.GetSymmetricalPos(x, y); 36 auto sym = p.GetSymmetricalPos(x, y);
38 Cell::Color oldColor = p.GetLine(sym.x, sym.y); 37 Cell::Color oldColor = p.GetLine(sym.x, sym.y);
@@ -40,11 +39,10 @@ void Solver::SolveLoop(Puzzle& p, int x, int y, std::vector<Puzzle>& solutions)
40 39
41 // Collided with ourselves or our reflection 40 // Collided with ourselves or our reflection
42 if (cell.color != Cell::Color::NONE) { 41 if (cell.color != Cell::Color::NONE) {
43 p.grid[sym.x, sym.y].color = oldColor; 42 p.grid[sym.x][sym.y].color = oldColor;
44 return; 43 return;
45 } 44 }
46 p.grid[x][y].color = Cell::Color::BLUE; // Otherwise, mark this cell as visited 45 p.grid[x][y].color = Cell::Color::BLUE; // Otherwise, mark this cell as visited
47 */
48 } 46 }
49 47
50 if (cell.end != Cell::Dir::NONE) { 48 if (cell.end != Cell::Dir::NONE) {
@@ -72,9 +70,7 @@ void Solver::SolveLoop(Puzzle& p, int x, int y, std::vector<Puzzle>& solutions)
72 p.grid[x][y].color = Cell::Color::NONE; 70 p.grid[x][y].color = Cell::Color::NONE;
73 p.sequence.pop_back(); 71 p.sequence.pop_back();
74 if (p.symmetry != Puzzle::Symmetry::NONE) { 72 if (p.symmetry != Puzzle::Symmetry::NONE) {
75 /*
76 auto sym = p.GetSymmetricalPos(x, y); 73 auto sym = p.GetSymmetricalPos(x, y);
77 p.grid[sym.x][sym.y].color = Cell::Color::NONE; 74 p.grid[sym.x][sym.y].color = Cell::Color::NONE;
78 */
79 } 75 }
80} 76}