diff --git a/cpp/src/coords.hpp b/cpp/src/coords.hpp index 4a48807..4972856 100644 --- a/cpp/src/coords.hpp +++ b/cpp/src/coords.hpp @@ -55,7 +55,7 @@ struct Coords { } bool is_within_bounds() const { - return this->to_index() < 64; + return 0 <= x && x < 8 && 0 <= y && y < 8; } };