Example #1
0
 public MotherFaker()
 {
     Dice = new FakeDice();
     Banker = new TraditionalBanker(new[] { 0 });
     JailRoster = new TraditionalJailRoster(Banker);
     GameBoard = new GameBoard(Banker);
     var cardDeckFactory = new TraditionalCardDeckFactory(Banker, JailRoster, GameBoard, Dice);
     LocationFactory = new TraditionalLocationFactory(Banker, Dice, JailRoster, GameBoard, cardDeckFactory);
     GameBoard.SetLocations(LocationFactory.GetLocations(), LocationFactory.GetRailroads(), LocationFactory.GetUtilities());
 }
Example #2
0
 public void SetUp()
 {
     playerId = 0;
     banker = new TraditionalBanker(new[] { playerId });
     jailRoster = new TraditionalJailRoster(banker);
     board = new GameBoard(banker);
     cardDeckFactory = new FakeCardDeckFactory(CreateCards());
     var locationFactory = new TraditionalLocationFactory(banker, dice, jailRoster, board, cardDeckFactory);
     board.SetLocations(locationFactory.GetLocations(), locationFactory.GetRailroads(), locationFactory.GetUtilities());
 }
Example #3
0
        private GameBoard CreateBoard()
        {
            var gameBoard = new GameBoard(banker);
            dice = new TraditionalDice();
            jailRoster = new TraditionalJailRoster(banker);
            var traditionalCardDeckFactory = new TraditionalCardDeckFactory(banker, jailRoster, gameBoard, dice);
            var locationFactory = new TraditionalLocationFactory(banker, dice, jailRoster, gameBoard, traditionalCardDeckFactory);

            gameBoard.SetLocations(locationFactory.GetLocations(), locationFactory.GetRailroads(), locationFactory.GetUtilities());

            return gameBoard;
        }
Example #4
0
 public virtual void SetUp()
 {
     playerOneId = 0;
     playerTwoId = 1;
     playerThreeId = 2;
     playerFourId = 3;
     playerFiveId = 4;
     banker = new TraditionalBanker(new[] { playerOneId, playerTwoId, playerThreeId, playerFourId, playerFiveId });
     jailRoster = new TraditionalJailRoster(banker);
     gameBoard = new GameBoard(banker);
     dice = new FakeDice();
     var cardDeckFactory = new TraditionalCardDeckFactory(banker, jailRoster, gameBoard, dice);
     var locationFactory = new TraditionalLocationFactory(banker, dice, jailRoster, gameBoard, cardDeckFactory);
     gameBoard.SetLocations(locationFactory.GetLocations(), locationFactory.GetRailroads(), locationFactory.GetUtilities());
 }
Example #5
0
        public void TestSetLocationsBuildsLocationsList()
        {
            var board = new GameBoard(banker);
            var location = new NullLocation(0, "null");
            var railroad = new Railroad(1, "railroad", 10, 10, banker, new Railroad[] {});
            var utility = new Utility(2, "utility", 10, 10, banker, new Utility[] {}, new FakeDice());
            board.SetLocations(new Location[] { location }, new Railroad[] { railroad }, new Utility[] { utility });

            Assert.That(board.Locations.Count(), Is.EqualTo(3));
        }