Provide a fix for the failing test-case
This commit is contained in:
parent
32119625b7
commit
dc510e00b0
1 changed files with 1 additions and 1 deletions
|
|
@ -64,7 +64,7 @@ export function determineDirection(board: any[], shipLocation: number) {
|
||||||
while (true) {
|
while (true) {
|
||||||
// The left side of the board is out of range, nearest ship is always
|
// The left side of the board is out of range, nearest ship is always
|
||||||
// right
|
// right
|
||||||
if (shipLocation - delta <= 0) {
|
if (shipLocation - delta < 0) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue