public static string SetInitRole(string playerHash, string roomHash) { CRoom r = CRoom.GetRoom(roomHash); if (r == null) { return(null); } r.UpdatePlayerRoles(playerHash); return("OK"); }
public static string GetGameEndStatus(string roomHash) { CRoom r = CRoom.GetRoom(roomHash); if (r == null) { return(null); } string answer = r.GetGameResponses(); return(answer); }
public static string GetGameSettings(string roomHash) { CRoom r = CRoom.GetRoom(roomHash); if (r == null) { return(null); } var json = new JavaScriptSerializer().Serialize(r.GetGameSettings()); return(json); }
public static string GetActiveGameUsers(string playerhash, string roomHash) { CRoom r = CRoom.GetRoom(roomHash); if (r == null) { return(null); } InGamePlayer[] allPlayers = r.GetAllGamesPlayers(playerhash).ToArray(); var json = new JavaScriptSerializer().Serialize(allPlayers); return(json); }
public static string SetResponse(string playerHash, string roomHash, string response) { CRoom r = CRoom.GetRoom(roomHash); if (r == null) { return(null); } if (r.UpdatePlayerResponse(roomHash, playerHash, response)) { return("OK"); } else { return("NotOK"); } }