示例#1
0
 public FindGameHandler(ILogger <FindGameHandler> logger, ICollections collections,
                        IGameSessionFactory sessionFactory, IMessageSender messageSender)
 {
     this.logger         = logger;
     this.collections    = collections;
     this.sessionFactory = sessionFactory;
     this.messageSender  = messageSender;
 }
示例#2
0
 public Game(string name, string description, int minNumberOfPlayers, int maxNumberOfPlayers, string category, IGameSessionFactory gameSessionFactory)
 {
     Name               = name;
     Description        = description;
     MinNumberOfPlayers = minNumberOfPlayers;
     MaxNumberOfPlayers = maxNumberOfPlayers;
     Category           = category;
     GameSessionFactory = gameSessionFactory;
 }
示例#3
0
        /// <summary>
        /// Constructs a new MainMenu object.
        /// </summary>
        public MainMenuScreen(Viewport viewport, SpriteBatch spriteBatch, SpriteFont font, IGameSessionFactory gameSessionFactory, IScreenFactory screenFactory, Quitter quitter) 
            : base(viewport, spriteBatch, font)
        {
            // TODO: There must be a way to reduce the number of parameters here???
            _gameSessionFactory = gameSessionFactory;
            _screenFactory = screenFactory;
            _quitter = quitter;

            // set the transition times
            TransitionOnTime = TimeSpan.FromSeconds(1.0);
            TransitionOffTime = TimeSpan.FromSeconds(0.0);
        }
示例#4
0
 public void Setup()
 {
     stubGameSessionFactory = MockRepository.GenerateStub<IGameSessionFactory>();
     stubScreenFactory = MockRepository.GenerateStub<IScreenFactory>();
     mainMenuScreen = new MainMenuScreen(new Viewport(), null, null, stubGameSessionFactory, stubScreenFactory, null);
 }