From e7fc1b06deae1de94fd73c6d0d1ac88265a9bb46 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Mon, 3 Feb 2025 13:50:48 +0100 Subject: [PATCH] fixed the is_within_bounds check --- cpp/src/coords.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } };