From 6f0a34bfb761d965bd961dc1f880b84e35f9959f Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Wed, 20 Nov 2019 10:05:59 -0800 Subject: Understanding symmetry, but nothing else. --- Source/Randomizer2.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'Source/Randomizer2.cpp') diff --git a/Source/Randomizer2.cpp b/Source/Randomizer2.cpp index 00b584e..e4f2b9f 100644 --- a/Source/Randomizer2.cpp +++ b/Source/Randomizer2.cpp @@ -14,6 +14,7 @@ Randomizer2::Randomizer2(const std::shared_ptr& memory) : _memory(memory void Randomizer2::Randomize() { RandomizeTutorial(); + RandomizeSymmetry(); // RandomizeKeep(); } @@ -105,44 +106,44 @@ void Randomizer2::RandomizeTutorial() { x = 1; y = 1; toTheRight = true; - cuts.emplace_back(Pos{0, 1}); + cuts.emplace_back(0, 1); break; case 2: x = 1; y = 1; toTheRight = true; - cuts.emplace_back(Pos{1, 0}); + cuts.emplace_back(1, 0); break; case 3: x = 11; y = 1; toTheRight = false; - cuts.emplace_back(Pos{12, 1}); + cuts.emplace_back(12, 1); break; case 4: x = 11; y = 1; toTheRight = false; - cuts.emplace_back(Pos{11, 0}); + cuts.emplace_back(11, 0); break; } while (y < p.height) { // The final cut will push y below the bottom of the puzzle, which means we're done. switch (Random::RandInt(1, 4)) { case 1: // Go right if (x < p.width-2) { - cuts.emplace_back(Pos{x+1, y}); + cuts.emplace_back(x+1, y); x += 2; } break; case 2: // Go left if (x > 1) { - cuts.emplace_back(Pos{x-1, y}); + cuts.emplace_back(x-1, y); x -= 2; } break; case 3: case 4: // Go down (biased) - cuts.emplace_back(Pos{x, y+1}); + cuts.emplace_back(x, y+1); y += 2; break; } @@ -159,6 +160,12 @@ void Randomizer2::RandomizeTutorial() { } } +void Randomizer2::RandomizeSymmetry() { + { // + + } +} + void Randomizer2::RandomizeKeep() { { // Hedges 1 Puzzle p; -- cgit 1.4.1