public HFTGame AddPlayerToGame(HFTPlayer player, string gameId, object data) { HFTGameGroup gameGroup = GetGameGroup(gameId); if (gameGroup == null) { return null; } return gameGroup.AddPlayer(player, data); }
public HFTGame AddPlayer(HFTPlayer player, object data) { if (masterGame_ != null) { return AddPlayerToGame(player, masterGame_.id, data); } log_.Error("no games to add player to"); return null; }
/** * Adds a player to a specific game. * @param {Player} player to add * @param {string} id * @param {Object?} data add to send in connect msg */ public HFTGame AddPlayerToGame(HFTPlayer player, string id, object data) { HFTGame game = GetGameById(id); if (game != null) { game.AddPlayer(player, data); return game; } log_.Error("no game with id '" + id + "'"); return null; }