diff options
Diffstat (limited to 'Source/Randomizer2.cpp')
-rw-r--r-- | Source/Randomizer2.cpp | 42 |
1 files changed, 30 insertions, 12 deletions
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() { | |||
30 | _serializer.WritePuzzle(p, 0x293); | 30 | _serializer.WritePuzzle(p, 0x293); |
31 | } | 31 | } |
32 | 32 | ||
33 | { | 33 | { // Center left |
34 | Puzzle p; | 34 | Puzzle p; |
35 | p.NewGrid(6, 6); | 35 | p.NewGrid(6, 6); |
36 | 36 | ||
@@ -48,17 +48,8 @@ void Randomizer2::RandomizeTutorial() { | |||
48 | p.grid[p.width-1][Random::RandInt(0, p.height-1)].end = Cell::Dir::RIGHT; | 48 | p.grid[p.width-1][Random::RandInt(0, p.height-1)].end = Cell::Dir::RIGHT; |
49 | break; | 49 | break; |
50 | } | 50 | } |
51 | switch (Random::RandInt(1, 3)) { | 51 | // [4/6/8][4/6/8] |
52 | case 1: // Horiz (6) [5/7][4/6/8] | 52 | p.grid[Random::RandInt(0, 2)*2 + 4][Random::RandInt(0, 2)*2 + 4].start = true; |
53 | p.grid[Random::RandInt(0, 1)*2 + 5][Random::RandInt(0, 2)*2 + 4].start = true; | ||
54 | break; | ||
55 | case 2: // Verti (6) [4/6/8][5/7] | ||
56 | p.grid[Random::RandInt(0, 2)*2 + 4][Random::RandInt(0, 1)*2 + 5].start = true; | ||
57 | break; | ||
58 | case 3: // Inter (9) [4/6/8][4/6/8] | ||
59 | p.grid[Random::RandInt(0, 2)*2 + 4][Random::RandInt(0, 2)*2 + 4].start = true; | ||
60 | break; | ||
61 | } | ||
62 | 53 | ||
63 | for (Pos pos : Randomizer2Core::CutEdges(p, 35, true)) { | 54 | for (Pos pos : Randomizer2Core::CutEdges(p, 35, true)) { |
64 | p.grid[pos.x][pos.y].gap = Cell::Gap::FULL; | 55 | p.grid[pos.x][pos.y].gap = Cell::Gap::FULL; |
@@ -66,6 +57,33 @@ void Randomizer2::RandomizeTutorial() { | |||
66 | 57 | ||
67 | _serializer.WritePuzzle(p, 0x295); | 58 | _serializer.WritePuzzle(p, 0x295); |
68 | } | 59 | } |
60 | |||
61 | { // Far left | ||
62 | Puzzle p; | ||
63 | p.NewGrid(10, 10); | ||
64 | |||
65 | p.grid[0][20].start = true; | ||
66 | p.grid[20][0].end = Cell::Dir::RIGHT; | ||
67 | |||
68 | for (Pos pos : Randomizer2Core::CutEdges(p, 96, true)) { | ||
69 | p.grid[pos.x][pos.y].gap = Cell::Gap::FULL; | ||
70 | } | ||
71 | _serializer.WritePuzzle(p, 0x2C2); | ||
72 | } | ||
73 | |||
74 | { // Back left | ||
75 | Puzzle p; | ||
76 | p.NewGrid(6, 6); | ||
77 | |||
78 | p.grid[0][12].start = true; | ||
79 | p.grid[12][0].end = Cell::Dir::RIGHT; | ||
80 | p.grid[12][12].end = Cell::Dir::RIGHT; | ||
81 | |||
82 | for (Pos pos : Randomizer2Core::CutEdges(p, 27, true)) { | ||
83 | p.grid[pos.x][pos.y].gap = Cell::Gap::BREAK; | ||
84 | } | ||
85 | _serializer.WritePuzzle(p, 0xA3B5); | ||
86 | } | ||
69 | } | 87 | } |
70 | 88 | ||
71 | void Randomizer2::RandomizeKeep() { | 89 | void Randomizer2::RandomizeKeep() { |