Fixed logical error....

This commit is contained in:
Jonathan Turner 2024-02-03 00:23:04 -05:00
parent b7b59d282f
commit a07e2098b0
2 changed files with 2 additions and 2 deletions

View File

@ -93,6 +93,6 @@ public class Board {
/* Checks if a given location is a valid location. */
private boolean invalidLocation(int loc) {
return (loc >= 0 && loc <= 8);
return (loc < 0 || loc > 8);
}
}

View File

@ -107,6 +107,6 @@ public class Piece {
/* Checks if a given location is a valid location. */
private boolean invalidLocation(int loc) {
return (loc >= 0 && loc <= 8);
return (loc < 0 || loc > 8);
}
}