diff --git a/common/src/algorithms/movementDirection.ts b/common/src/algorithms/movementDirection.ts index 5760c1f..cc3ca05 100644 --- a/common/src/algorithms/movementDirection.ts +++ b/common/src/algorithms/movementDirection.ts @@ -64,7 +64,7 @@ export function determineDirection(board: any[], shipLocation: number) { while (true) { // The left side of the board is out of range, nearest ship is always // right - if (shipLocation - delta <= 0) { + if (shipLocation - delta < 0) { return 1; }