summary refs log tree commit diff stats
path: root/Source/Randomizer2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Randomizer2.cpp')
-rw-r--r--Source/Randomizer2.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/Source/Randomizer2.cpp b/Source/Randomizer2.cpp index 107950d..d2046bb 100644 --- a/Source/Randomizer2.cpp +++ b/Source/Randomizer2.cpp
@@ -208,6 +208,53 @@ void Randomizer2::RandomizeSymmetry() {
208 208
209 _serializer.WritePuzzle(p, 0x59); 209 _serializer.WritePuzzle(p, 0x59);
210 } 210 }
211 { // Back wall 4
212 Puzzle p;
213 p.NewGrid(5, 8);
214 p.symmetry = Puzzle::Symmetry::X;
215 p.grid[2][16].start = true;
216 p.grid[8][16].start = true;
217 p.grid[4][0].end = Cell::Dir::UP;
218 p.grid[6][0].end = Cell::Dir::UP;
219 std::vector<Pos> cutEdges = Randomizer2Core::CutSymmetricalEdgePairs(p, 15);
220 for (int i=0; i<cutEdges.size(); i++) {
221 Pos pos = cutEdges[i];
222 if (i%2 == 0) {
223 p.grid[pos.x][pos.y].gap = Cell::Gap::BREAK;
224 } else {
225 Pos sym = p.GetSymmetricalPos(pos.x, pos.y);
226 p.grid[sym.x][sym.y].gap = Cell::Gap::BREAK;
227 }
228 }
229
230 _serializer.WritePuzzle(p, 0x62);
231 }
232 { // Back wall 5
233 Puzzle p;
234 p.NewGrid(11, 8);
235 p.symmetry = Puzzle::Symmetry::X;
236 p.grid[0][16].start = true;
237 p.grid[10][16].start = true;
238 p.grid[12][16].start = true;
239 p.grid[22][16].start = true;
240 p.grid[2][0].end = Cell::Dir::UP;
241 p.grid[8][0].end = Cell::Dir::UP;
242 p.grid[14][0].end = Cell::Dir::UP;
243 p.grid[20][0].end = Cell::Dir::UP;
244
245 Puzzle q;
246 q.NewGrid(5, 8);
247 q.symmetry = Puzzle::Symmetry::X;
248
249 for (Pos pos : Randomizer2Core::CutSymmetricalEdgePairs(q, 16)) {
250 p.grid[pos.x][pos.y].gap = Cell::Gap::BREAK;
251 }
252 for (Pos pos : Randomizer2Core::CutSymmetricalEdgePairs(q, 16)) {
253 p.grid[pos.x + 12][pos.y].gap = Cell::Gap::BREAK;
254 }
255
256 _serializer.WritePuzzle(p, 0x5C);
257 }
211} 258}
212 259
213void Randomizer2::RandomizeKeep() { 260void Randomizer2::RandomizeKeep() {