示例#1
0
 public GameSessionManager(UInt32 maximumPlayerCount, String logFileBasePath)
 {
     this.clients = new List <IClientCallback>();
     this.waitingForGameSessionQueue = new ConcurrentQueue <AddPlayerMessage>();
     this.gameSessions            = new Dictionary <Guid, GameSession>();
     this.maximumPlayerCount      = maximumPlayerCount;
     this.cancellationTokenSource = new CancellationTokenSource();
     this.gameSessionTokenFactory = new GameSessionTokenFactory();
     this.playerCardRepository    = new PlayerCardRepository();
     this.loggerFactory           = new FileLoggerFactory(logFileBasePath);
     this.State = States.Stopped;
 }
 public static Jabberwocky.SoC.Service.GameSessionManager AddGameSessionTokenFactory(this Jabberwocky.SoC.Service.GameSessionManager gameSessionManager, IGameSessionTokenFactory gameSessionTokenFactory)
 {
     gameSessionManager.GameSessionTokenFactory = gameSessionTokenFactory;
     return(gameSessionManager);
 }