about summary refs log tree commit diff stats
path: root/Source/Puzzle.h
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2020-03-03 21:25:56 -0800
committerjbzdarkid <jbzdarkid@gmail.com>2020-03-03 21:25:56 -0800
commit3ece17f201686342e8aff90148f360245788b234 (patch)
treea1deba5c1b09ecdc56d2c94b880ef8767289371d /Source/Puzzle.h
parente77cfa1596f996cc50c1601ee29891a7fb7eb62d (diff)
downloadwitness-tutorializer-3ece17f201686342e8aff90148f360245788b234.tar.gz
witness-tutorializer-3ece17f201686342e8aff90148f360245788b234.tar.bz2
witness-tutorializer-3ece17f201686342e8aff90148f360245788b234.zip
add support for puzzle serialization
Diffstat (limited to 'Source/Puzzle.h')
-rw-r--r--Source/Puzzle.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Puzzle.h b/Source/Puzzle.h index c2a8fce..6ba6bc1 100644 --- a/Source/Puzzle.h +++ b/Source/Puzzle.h
@@ -45,6 +45,7 @@ struct Cell {
45 std::shared_ptr<Decoration> decoration = nullptr; 45 std::shared_ptr<Decoration> decoration = nullptr;
46 46
47 bool start = false; 47 bool start = false;
48 // TODO: Top/bottom
48 enum class Dir {NONE, LEFT, RIGHT, UP, DOWN}; 49 enum class Dir {NONE, LEFT, RIGHT, UP, DOWN};
49 Dir end = Dir::NONE; 50 Dir end = Dir::NONE;
50 51
@@ -92,6 +93,8 @@ public:
92 void NewGrid(int newWidth, int newHeight); 93 void NewGrid(int newWidth, int newHeight);
93 Pos GetSymmetricalPos(int x, int y) const; 94 Pos GetSymmetricalPos(int x, int y) const;
94 95
96 std::string Serialize();
97
95// private: 98// private:
96 std::vector<std::vector<Cell>> grid; 99 std::vector<std::vector<Cell>> grid;
97 100