From 7a13ef0a94f6ed4989677530b1b37e1af0692fc7 Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Mon, 18 Nov 2019 10:03:00 -0800 Subject: Done with most of tutorial --- Source/Randomizer2.cpp | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) (limited to 'Source/Randomizer2.cpp') diff --git a/Source/Randomizer2.cpp b/Source/Randomizer2.cpp index c28795a..83427d7 100644 --- a/Source/Randomizer2.cpp +++ b/Source/Randomizer2.cpp @@ -30,7 +30,7 @@ void Randomizer2::RandomizeTutorial() { _serializer.WritePuzzle(p, 0x293); } - { + { // Center left Puzzle p; p.NewGrid(6, 6); @@ -48,17 +48,8 @@ void Randomizer2::RandomizeTutorial() { p.grid[p.width-1][Random::RandInt(0, p.height-1)].end = Cell::Dir::RIGHT; break; } - switch (Random::RandInt(1, 3)) { - case 1: // Horiz (6) [5/7][4/6/8] - p.grid[Random::RandInt(0, 1)*2 + 5][Random::RandInt(0, 2)*2 + 4].start = true; - break; - case 2: // Verti (6) [4/6/8][5/7] - p.grid[Random::RandInt(0, 2)*2 + 4][Random::RandInt(0, 1)*2 + 5].start = true; - break; - case 3: // Inter (9) [4/6/8][4/6/8] - p.grid[Random::RandInt(0, 2)*2 + 4][Random::RandInt(0, 2)*2 + 4].start = true; - break; - } + // [4/6/8][4/6/8] + p.grid[Random::RandInt(0, 2)*2 + 4][Random::RandInt(0, 2)*2 + 4].start = true; for (Pos pos : Randomizer2Core::CutEdges(p, 35, true)) { p.grid[pos.x][pos.y].gap = Cell::Gap::FULL; @@ -66,6 +57,33 @@ void Randomizer2::RandomizeTutorial() { _serializer.WritePuzzle(p, 0x295); } + + { // Far left + Puzzle p; + p.NewGrid(10, 10); + + p.grid[0][20].start = true; + p.grid[20][0].end = Cell::Dir::RIGHT; + + for (Pos pos : Randomizer2Core::CutEdges(p, 96, true)) { + p.grid[pos.x][pos.y].gap = Cell::Gap::FULL; + } + _serializer.WritePuzzle(p, 0x2C2); + } + + { // Back left + Puzzle p; + p.NewGrid(6, 6); + + p.grid[0][12].start = true; + p.grid[12][0].end = Cell::Dir::RIGHT; + p.grid[12][12].end = Cell::Dir::RIGHT; + + for (Pos pos : Randomizer2Core::CutEdges(p, 27, true)) { + p.grid[pos.x][pos.y].gap = Cell::Gap::BREAK; + } + _serializer.WritePuzzle(p, 0xA3B5); + } } void Randomizer2::RandomizeKeep() { -- cgit 1.4.1