コード例 #1
0
        private static void Run4PlayerGame()
        {
            var g      = new BriscolaGame(new ItalianDeckFactory(), new PlayerFactory());
            var runner = new GameRunner(g, _ui, _strategyFactory);

            runner.InitializeHumanGame(4);
            runner.Play();
        }
コード例 #2
0
ファイル: GameRunnerTest.cs プロジェクト: mrtotov/Briscola
        public void Initialize_should_run_game()
        {
            _gameMock.Setup(x => x.Join(It.IsAny <string>(), It.IsAny <IStrategy>()));
            _strategyFactory.Setup(x => x.GetAllRobots()).Returns(new[] { new RandomStrategy() });

            _sut.InitializeHumanGame(4);

            _gameMock.Verify(m => m.Join(It.IsAny <string>(), It.IsAny <IStrategy>()), Times.AtLeast(2));
        }