#pragma once #include "Memory.h" #include class ChallengeRandomizer { public: ChallengeRandomizer(const std::shared_ptr& memory, int seed); private: void AdjustRng(int offset); std::shared_ptr _memory; int RNG_ADDR; int RNG2_ADDR; }; lizer/atom/Source/Randomizer2Core.h?h=tutorial-v0.4.0' type='application/atom+xml'/>
about summary refs log tree commit diff stats
blob: df98de8a948c86eea12732666593a08d08e53760 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once

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);
};