public static void CheckEndGame() {
		// TODO: Implement game checking code here.
		int winningPlayer = -1;
		switch(Instance.gameMode) {
		case DOMINATION : //First player to control >= 75% of all planets in the game.
			float limit = (float) (Instance.numPlanets) * 0.75f;
			for(int i = 0; i < TurnManager.numPlayers; i++) {
				Player p = TurnManager.getPlayer(i + 1);
				if(p.getTerritory().size() >= limit) {
					Instance.gameOver = true;
					winningPlayer = i+1;
				}
			}
			break;
		case SURVIVAL : //Game ends when all players have died. (PvE style)
			break;
		case DEATHMATCH : //Last player to still have his Capital ship wins.
			break;
		case CONQUEST : //Last player with any ship alive wins.
		}
		if(Instance.gameOver) {
			TurnManager.currentPlayer = -1;
			TurnManager.NoFoW = true;
			Instance.winner = winningPlayer;
			Instance.alertListeners(new GameEvent(GameEvent.GAME_OVER));
			if(debug) System.out.println("Player " + winningPlayer + " wins");
		}
	}