fix solveVertical

This commit is contained in:
Sandipsinh Rathod 2024-10-11 13:39:49 -04:00
parent be78c4fa6c
commit 3cbb9989c6
No known key found for this signature in database

@ -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);