fixed winning condition in SpaceSnake
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user