From 2ed5251f9b9d9a7ce4f7d5588301c4471df8777a Mon Sep 17 00:00:00 2001 From: Eideen Date: Tue, 4 May 2021 00:07:06 +0200 Subject: [PATCH] Rectify winner display --- src/battleship/model/Game.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battleship/model/Game.java b/src/battleship/model/Game.java index 0690e78..80f1f95 100644 --- a/src/battleship/model/Game.java +++ b/src/battleship/model/Game.java @@ -56,7 +56,7 @@ public class Game { return players[1]; remainingShip = players[1].getShips().parallelStream().filter(ship -> !ship.isDrown()).findFirst().orElse(null); if(remainingShip == null) - return players[1]; + return players[0]; return null; }