Пример #1
0
 private Command(string name, Server server, Client client, string details, bool isFromServer, string type, Game game = null)
 {
     Name = name;
     Server = server;
     Client = client;
     Details = details;
     IsFromServer = isFromServer;
     Type = type;
     Game = game;
     ExecutionTime = DateTime.Now;
 }
Пример #2
0
 public Table(string tableName, GameSubTypeEnum gameSubType, int minPlayersToStart, int maxPlayers, BlindTypeEnum blindType, LobbyTypeEnum lobbyType, LimitTypeEnum limitType, Server server)
 {
     TableName = tableName;
     GameSubType = gameSubType;
     MinPlayersToStart = minPlayersToStart;
     MaxPlayers = maxPlayers;
     BlindType = blindType;
     LobbyType = lobbyType;
     LimitType = limitType;
     Server = server;
 }
Пример #3
0
 private static void RegisterCommand(string name, Server srv, Client cli, string detail, bool isFromServer, string type, Game g = null)
 {
     Database.CommandsToLog.Add(new Command(name, srv, cli, detail, isFromServer, type, g));
 }
Пример #4
0
 private static Table FindTable(GameEntity x, Server s)
 {
     if (!m_Tables.ContainsKey(x.TableParamId))
     {
         var tab = x.TableParam;
         m_Tables.Add(x.TableParamId, new Table(
             tab.TableName,
             FindGameSubType(tab),
             tab.MinPlayerToStart,
             tab.MaxPlayer,
             FindBlind(tab),
             FindLobby(tab),
             FindLimit(tab),
             s)
         {
             TableStartedAt = tab.TableStartedAt,
             GameType = FindGameType(tab)
         });
     }
     return m_Tables[x.TableParamId];
 }
Пример #5
0
 private static Game FindGame(CommandEntity x, Server s)
 {
     if (x.GameId == null)
         return null;
     if (!m_Games.ContainsKey(x.GameId.Value))
     {
         var gam = x.Game;
         m_Games.Add(x.GameId.Value, new Game(FindTable(gam, s))
         {
             GameStartedAt = gam.GameStartedAt
         });
     }
     return m_Games[x.GameId.Value];
 }
Пример #6
0
 public static void RegisterLobbyCommandFromServer(string name, Server srv, Client cli, string detail)
 {
     RegisterCommand(name, srv, cli, detail, true, LOBBY);
 }
Пример #7
0
 public static void RegisterGeneralCommandFromServer(string name, Server srv, Client cli, string detail)
 {
     RegisterCommand(name, srv, cli, detail, true, GENERAL);
 }