Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
 public void Setup()
 {
     stubGameSessionFactory = MockRepository.GenerateStub<IGameSessionFactory>();
     stubScreenFactory = MockRepository.GenerateStub<IScreenFactory>();
     mainMenuScreen = new MainMenuScreen(new Viewport(), null, null, stubGameSessionFactory, stubScreenFactory, null);
 }