From cbdf87bb8aaebca9c969dfec3c1664b9b6355a0d Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Fri, 22 Nov 2019 09:37:10 -0800 Subject: Asymmetrical gaps --- Source/Puzzle.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Source/Puzzle.h') 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 { struct Negation {}; struct Pos { + Pos() = default; // Required for use in std::maps Pos(int x_, int y_) : x(x_), y(y_) {} Pos(const std::tuple& xy) : x(std::get<0>(xy)), y(std::get<1>(xy)) {} - int x; - int y; + bool operator==(Pos other) {return x == other.x && y == other.y;} + int x = 0; + int y = 0; }; class Puzzle { -- cgit 1.4.1