Esempio n. 1
0
 public static CardGameBean CreateGame() {
   return GameLobbyBean.GetInstance().getNewCardGame();
 }
Esempio n. 2
0
  /*
  public static void quitGame(GameBean gameBean, BattleFarmExtension extension)
  {
  	// Remove game from gameList
  	extension.getGames().remove(gameBean);

  	// Destroy game objects
  	gameBean.setPlayers(null);
  	gameBean.setBaseGameMapBean(null);

  	extension.trace("Battlefarm: game " + gameBean.getId() + " destroyed");

  	gameBean = null;
  }
  */
  public static void RemovePlayer(int gameID, int playerID) {
    CardGameBean game = GameLobbyBean.GetInstance().getGameMap().get(gameID);
    if (game == null) return;
    if (game.getDeck().get(playerID) == null) return;
    game.setNeedClose();
  }