From da6dcacf4314463e33c29a0a2831fb3bf80f4d4c Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Tue, 26 Nov 2019 10:06:47 -0800 Subject: WIP on end of glass factory --- Source/Randomizer2.cpp | 56 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) (limited to 'Source/Randomizer2.cpp') diff --git a/Source/Randomizer2.cpp b/Source/Randomizer2.cpp index 4968666..b1cdc1f 100644 --- a/Source/Randomizer2.cpp +++ b/Source/Randomizer2.cpp @@ -270,14 +270,66 @@ void Randomizer2::RandomizeSymmetry() { p.grid[1][6].gap = Cell::Gap::BREAK; for (Pos pos : Randomizer2Core::CutSymmetricalEdgePairs(p, 1)) { - std::string text = std::to_string(pos.x) + " " + std::to_string(pos.y); - OutputDebugStringA(text.c_str()); p.grid[pos.x][pos.y].gap = Cell::Gap::BREAK; Pos sym = p.GetSymmetricalPos(pos.x, pos.y); p.grid[sym.x][sym.y].gap = Cell::Gap::BREAK; } _serializer.WritePuzzle(p, 0x8D); } + { // Rotational 2 + Puzzle p; + p.NewGrid(3, 3); + p.symmetry = Puzzle::Symmetry::XY; + p.grid[6][0].start = true; + p.grid[0][6].start = true; + p.grid[4][0].end = Cell::Dir::UP; + p.grid[2][6].end = Cell::Dir::DOWN; + + p.grid[5][0].gap = Cell::Gap::BREAK; + p.grid[1][6].gap = Cell::Gap::BREAK; + + std::vector cutEdges = Randomizer2Core::CutSymmetricalEdgePairs(p, 3); + for (int i=0; i cutEdges = Randomizer2Core::CutSymmetricalEdgePairs(p, 3); + for (int i=0; i