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/Randomizer2Core.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'Source/Randomizer2Core.cpp') diff --git a/Source/Randomizer2Core.cpp b/Source/Randomizer2Core.cpp index 401743f..2a2c6ff 100644 --- a/Source/Randomizer2Core.cpp +++ b/Source/Randomizer2Core.cpp @@ -17,15 +17,28 @@ std::vector Randomizer2Core::CutSymmetricalEdgePairs(const Puzzle& p, size_ for (int y=0; y Randomizer2Core::CutEdgesInternal(const Puzzle& p, int xMin, int xMax, int yMin, int yMax, size_t numEdges) { @@ -36,6 +49,7 @@ std::vector Randomizer2Core::CutEdgesInternal(const Puzzle& p, int xMin, in if (p.grid[x][y].gap != Cell::Gap::NONE) continue; if (p.grid[x][y].start) continue; if (p.grid[x][y].end != Cell::Dir::NONE) continue; + if (p.symmetry == Puzzle::Symmetry::XY && x > y) continue; // Only allow cuts bottom-left of the diagonal // If the puzzle already has a sequence, don't cut along it. bool inSequence = false; @@ -51,7 +65,7 @@ std::vector Randomizer2Core::CutEdgesInternal(const Puzzle& p, int xMin, in std::vector cutEdges; for (int i=0; i 0) { int edge = Random::RandInt(0, static_cast(edges.size() - 1)); Pos pos = edges[edge]; edges.erase(edges.begin() + edge); -- cgit 1.4.1