diff options
Diffstat (limited to 'Source/Randomizer2.cpp')
-rw-r--r-- | Source/Randomizer2.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/Randomizer2.cpp b/Source/Randomizer2.cpp index cc23c7d..c823567 100644 --- a/Source/Randomizer2.cpp +++ b/Source/Randomizer2.cpp | |||
@@ -177,7 +177,24 @@ void Randomizer2::RandomizeSymmetry() { | |||
177 | Puzzle p; | 177 | Puzzle p; |
178 | p.NewGrid(4, 4); | 178 | p.NewGrid(4, 4); |
179 | p.symmetry = Puzzle::Symmetry::X; | 179 | p.symmetry = Puzzle::Symmetry::X; |
180 | 180 | p.grid[0][8].start = true; | |
181 | p.grid[8][8].start = true; | ||
182 | p.grid[2][0].end = Cell::Dir::UP; | ||
183 | p.grid[6][0].end = Cell::Dir::UP; | ||
184 | // @Bug: This can still make the puzzle unsolvable, if it leaves the centerline free -- even though two lines can't pass through the centerline. | ||
185 | // ^ Try seed = 13710 | ||
186 | std::vector<Pos> cutEdges = Randomizer2Core::CutSymmetricalEdgePairs(p, 4); | ||
187 | for (int i=0; i<2; i++) { | ||
188 | Pos pos = cutEdges[i]; | ||
189 | p.grid[pos.x][pos.y].gap = Cell::Gap::BREAK; | ||
190 | } | ||
191 | for (int i=2; i<4; i++) { | ||
192 | Pos pos = cutEdges[i]; | ||
193 | Pos sym = p.GetSymmetricalPos(pos.x, pos.y); | ||
194 | p.grid[sym.x][sym.y].gap = Cell::Gap::BREAK; | ||
195 | } | ||
196 | |||
197 | _serializer.WritePuzzle(p, 0x87); | ||
181 | } | 198 | } |
182 | } | 199 | } |
183 | 200 | ||