fixed winning condition in SpaceSnake

This commit is contained in:
2026-01-07 15:06:12 +01:00
parent d4a7fcada7
commit 47c40c4941

View File

@@ -110,7 +110,7 @@ public class SpaceSnake extends StatelessGame {
playerMoveEvent.getPlayer().teleport(this.getSpawn());
playerMoveEvent.getPlayer().setGameMode(GameMode.SPECTATOR);
long livingPlayers = this.getPlayers().stream()
.filter(p -> this.getScore().hasResult(p))
.filter(p -> !this.getScore().hasResult(p))
.count();
if(livingPlayers == 1) this.setTimeLimit(10);
if(livingPlayers == 0) this.stop();