public string ShowGameReplay(int gameRoomID, int gameNumber, int userID) { GameReplay gr = GetGameReplayForUser(gameRoomID, gameNumber, userID); if (gr != null) { return(gr.ToString()); } return(""); }
public void UpdateGameReplayById(int roomId, int gameId, GameReplay newRep) { foreach (var x in _gamesActions) { if (x.Key._gameRoomID == roomId & x.Key._gameNumber == gameId) { List <int> val = x.Value; _gamesActions.Remove(x.Key); _gamesActions.Add(newRep, val); } } }
public bool AddGameReplay(GameReplay gr, List <int> ids) { lock (padlock) { if (gr == null || gr._gameNumber < 0 || gr._gameRoomID < 0 || IsExist(gr._gameRoomID, gr._gameNumber)) { return(false); } if (ids == null || ids.Count == 0) { return(false); } _gamesActions.Add(gr, ids); } return(true); }