Fixed logical error....
This commit is contained in:
parent
b7b59d282f
commit
a07e2098b0
@ -93,6 +93,6 @@ public class Board {
|
|||||||
|
|
||||||
/* Checks if a given location is a valid location. */
|
/* Checks if a given location is a valid location. */
|
||||||
private boolean invalidLocation(int loc) {
|
private boolean invalidLocation(int loc) {
|
||||||
return (loc >= 0 && loc <= 8);
|
return (loc < 0 || loc > 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,6 @@ public class Piece {
|
|||||||
|
|
||||||
/* Checks if a given location is a valid location. */
|
/* Checks if a given location is a valid location. */
|
||||||
private boolean invalidLocation(int loc) {
|
private boolean invalidLocation(int loc) {
|
||||||
return (loc >= 0 && loc <= 8);
|
return (loc < 0 || loc > 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user