Fix logic error
This commit is contained in:
@@ -201,7 +201,7 @@ void playerReady(Player player, List<Battleship> ships) {
|
||||
private boolean checkShips(Player player, List<Battleship> ships) {
|
||||
for(Battleship ship : ships) {
|
||||
for(Battleship other : ships) {
|
||||
if(ship.collidesWith(other)) {
|
||||
if(ship.collidesWith(other) && !ship.equals(other)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user