From ac83733b590f3c0750bea1de3556ceb24fa0a4b1 Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Mon, 25 Nov 2019 21:10:50 -0800 Subject: Using PCH to clean up includes --- Source/Randomizer2.cpp | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'Source/Randomizer2.cpp') diff --git a/Source/Randomizer2.cpp b/Source/Randomizer2.cpp index f93e4fd..4f0bad0 100644 --- a/Source/Randomizer2.cpp +++ b/Source/Randomizer2.cpp @@ -1,14 +1,11 @@ +#include "pch.h" #include "Randomizer2.h" #include "PuzzleSerializer.h" #include "Randomizer2Core.h" #include "Puzzle.h" #include "Random.h" #include "Solver.h" - -#include -#include - -#pragma warning (disable: 26451) +#include "Windows.h" Randomizer2::Randomizer2(const PuzzleSerializer& serializer) : _serializer(serializer) {} @@ -229,6 +226,7 @@ void Randomizer2::RandomizeSymmetry() { _serializer.WritePuzzle(p, 0x62); } + // TODO: Positioning is off, slightly -- which means you can start from the bottom left, if you peek around. { // Back wall 5 Puzzle p; p.NewGrid(11, 8); @@ -259,6 +257,28 @@ void Randomizer2::RandomizeSymmetry() { _serializer.WritePuzzle(p, 0x5C); } + + { // Rotational 1 + 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; + + 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); + } } void Randomizer2::RandomizeKeep() { -- cgit 1.4.1