+package com.codingame.game;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import com.codingame.gameengine.core.MultiplayerGameManager;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+@Singleton
+public class GameManager {
+ @Inject private MultiplayerGameManager<Player> gameManager;
+
+ Player getPlayer(int index) { return gameManager.getPlayer(index); }
+ List<Player> getPlayers() { return gameManager.getPlayers(); }
+ List<Player> getActivePlayers() {
+ return gameManager.getPlayers().stream()
+ .filter(p -> p.isActive() && !p.model.hit)
+ .collect(Collectors.toList());
+ }
+
+ void endGame() { gameManager.endGame(); }
+}