about summary refs log tree commit diff stats
path: root/Source/Puzzle.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Puzzle.h')
-rw-r--r--Source/Puzzle.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Puzzle.h b/Source/Puzzle.h index 8afb9ca..b7dedd5 100644 --- a/Source/Puzzle.h +++ b/Source/Puzzle.h
@@ -62,10 +62,12 @@ struct Cell {
62 62
63struct Negation {}; 63struct Negation {};
64struct Pos { 64struct Pos {
65 Pos() = default; // Required for use in std::maps
65 Pos(int x_, int y_) : x(x_), y(y_) {} 66 Pos(int x_, int y_) : x(x_), y(y_) {}
66 Pos(const std::tuple<int, int>& xy) : x(std::get<0>(xy)), y(std::get<1>(xy)) {} 67 Pos(const std::tuple<int, int>& xy) : x(std::get<0>(xy)), y(std::get<1>(xy)) {}
67 int x; 68 bool operator==(Pos other) {return x == other.x && y == other.y;}
68 int y; 69 int x = 0;
70 int y = 0;
69}; 71};
70 72
71class Puzzle { 73class Puzzle {