about summary refs log tree commit diff stats
path: root/Source/Randomizer2Core.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Randomizer2Core.h')
-rw-r--r--Source/Randomizer2Core.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/Randomizer2Core.h b/Source/Randomizer2Core.h new file mode 100644 index 0000000..1b97fba --- /dev/null +++ b/Source/Randomizer2Core.h
@@ -0,0 +1,21 @@
1#pragma once
2#include <vector>
3
4struct Pos;
5class Puzzle;
6
7class Randomizer2Core {
8public:
9 // CAUTION: Does not actually cut edges, just returns a list of suggested cuts.
10 // Cuts a number of edges equal to the number of colors in the color grid.
11 static std::vector<Pos> CutEdgesToBeUnique(const Puzzle& p);
12 static void CutEdgesNotOutsideNotBreakingSequence(Puzzle& p, size_t numEdges);
13
14private:
15 static std::vector<Pos> CutEdgesInternal(const Puzzle& p, std::vector<std::vector<int>>& colorGrid, std::vector<Pos>& edges, size_t numEdges);
16 static void DebugColorGrid(const std::vector<std::vector<int>>& colorGrid);
17 static void FloodFill(const Puzzle& p, std::vector<std::vector<int>>& colorGrid, int color, int x, int y);
18 static void FloodFillOutside(const Puzzle& p, std::vector<std::vector<int>>& colorGrid, int x, int y);
19 static std::tuple<std::vector<std::vector<int>>, int> CreateColorGrid(const Puzzle& p);
20};
21