about summary refs log tree commit diff stats
path: root/data/maps/the_symbolic/rooms/Tutorial.txtpb
diff options
context:
space:
mode:
Diffstat (limited to 'data/maps/the_symbolic/rooms/Tutorial.txtpb')
0 files changed, 0 insertions, 0 deletions
?h=tutorial-v0.4.0&id=4816728c4a5bcf8fd9992f32464a1707f94c3b13'>^
fc8649b ^





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21







                       



                                                                                            

        
                                                                                                                       





                                                                                                              
#pragma once
#include <vector>

struct Pos;
class Puzzle;

class Randomizer2Core {
public:
    // CAUTION: These do not actually cut edges, they just returns a list of suggested cuts.
    static std::vector<Pos> CutEdges(const Puzzle& p, size_t numEdges);
    static std::vector<Pos> CutInsideEdges(const Puzzle& p, size_t numEdges);
    static std::vector<Pos> CutSymmetricalEdgePairs(const Puzzle& p, size_t numEdges);

private:
    static std::vector<Pos> CutEdgesInternal(const Puzzle& p, int xMin, int xMax, int yMin, int yMax, size_t numEdges);
    static void DebugColorGrid(const std::vector<std::vector<int>>& colorGrid);
    static void FloodFill(const Puzzle& p, std::vector<std::vector<int>>& colorGrid, int color, int x, int y);
    static void FloodFillOutside(const Puzzle& p, std::vector<std::vector<int>>& colorGrid, int x, int y);
    static std::tuple<std::vector<std::vector<int>>, int> CreateColorGrid(const Puzzle& p);
};