public GameManager(Server server, Game game,
                    IServerMessageFactory messageFactory, PlayerEventManager pem)
 {
     _server         = server;
     _game           = game;
     _messageFactory = messageFactory;
     _pem            = pem;
     _readyUserIDs   = new List <Guid>();
     _game.CurrentState.PropertyChanged += OnGameStateUpdate;
 }
Exemple #2
0
 public Server(bool dedicated = false)
 {
     IsDedicated = dedicated;
     RegisterServerDependencies();
     Host = new LocalUser("Server")
     {
         IsHost = true,
         Perms  = new Permissions
         {
             CanKick = true
         }
     };
     ChatManager        = IoCManager.Resolve <IServerChatManager>();
     ChatManager.Server = this;
     Lobby           = new ServerLobby(this);
     _messageFactory = IoCManager.Resolve <IServerMessageFactory>();
 }