From 3cbb9989c64b894c4a4901466e86445802ff6fe6 Mon Sep 17 00:00:00 2001 From: Sandipsinh Rathod Date: Fri, 11 Oct 2024 13:39:49 -0400 Subject: [PATCH] fix `solveVertical` --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 16aac5e..5d1589a 100644 --- a/main.cpp +++ b/main.cpp @@ -388,7 +388,7 @@ void solveVertical( // need to check for x-1, x+1, y-1, y+1 // check for any box below current move - if (moveX < x - 3 && board[moveX + 2][moveY] != ' ' && board[moveX + 1][moveY - 1] != ' ') { + if (moveX < x - 2 && board[moveX + 2][moveY] != ' ' && board[moveX + 1][moveY - 1] != ' ') { int rightEdge = moveY == y - 1 ? 1 : board[moveX + 1][moveY + 1] != ' '; if (rightEdge) { addPoint(points, board, moveX + 1, moveY, player);