From 0baa521ba34d2cd4e0f732f83d23b807605786a2 Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Sat, 16 Nov 2019 10:27:06 -0800 Subject: More and more progress. Split out functions in serializer Figured out how to allocate memory (for sequences) --- Source/Puzzle.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'Source/Puzzle.h') diff --git a/Source/Puzzle.h b/Source/Puzzle.h index 3a8e73b..fdf51be 100644 --- a/Source/Puzzle.h +++ b/Source/Puzzle.h @@ -64,21 +64,23 @@ struct Pos {int x; int y;}; class Puzzle { public: - int16_t height; - int16_t width; + int16_t height = 0; + int16_t width = 0; bool hasDecorations = false; enum class Symmetry {NONE, X, Y, XY}; Symmetry sym = Symmetry::NONE; bool pillar = false; - bool valid; + bool valid = false; std::vector negations; std::vector invalidElements; - inline Cell GetCell(int x, int y) const; - inline Cell::Color GetLine(int x, int y) const; - inline void NewGrid(int newWidth, int newHeight); + std::vector sequence; + + Cell GetCell(int x, int y) const; + Cell::Color GetLine(int x, int y) const; + void NewGrid(int newWidth, int newHeight); // @TODO: Pos GetSymmetricalPos(int x, int y); @@ -86,7 +88,7 @@ public: // private: std::vector> grid; -private: - inline int Mod(int x) const; - inline bool SafeCell(int x, int y) const; +// private: + int Mod(int x) const; + bool SafeCell(int x, int y) const; }; -- cgit 1.4.1