Exemplo n.º 1
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());
 }
Exemplo n.º 2
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());
 }
Exemplo n.º 3
0
 public void SetUp()
 {
     banker = new TraditionalBanker(new[] { 0 });
     jailRoster = new TraditionalJailRoster(banker);
     board = new GameBoard(banker);
     var dice = new FakeDice();
     var cardDeckFactory = new FakeCardDeckFactory(CreateCards());
     communityChest = new CardDraw(0, "Community Chest", banker, cardDeckFactory.GetCommunityChestDeck());
     var traditionalLocationFactory =
         new TraditionalLocationFactory(banker, dice, jailRoster, board, cardDeckFactory);
     board.SetLocations(traditionalLocationFactory.GetLocations(), traditionalLocationFactory.GetRailroads(), traditionalLocationFactory.GetUtilities());
 }
Exemplo n.º 4
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;
        }
Exemplo n.º 5
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());
 }
Exemplo n.º 6
0
 private Turn CreateTurnWithSpecificCards(IDice dice, IEnumerable<ICard> cards)
 {
     cardDeckFactory = new FakeCardDeckFactory(cards);
     var locationFactory = new TraditionalLocationFactory(banker, dice, jailRoster, board, cardDeckFactory);
     board.SetLocations(locationFactory.GetLocations(), locationFactory.GetRailroads(), locationFactory.GetUtilities());
     return new NormalTurn(playerId, dice, jailRoster, board);
 }
Exemplo n.º 7
0
 private Turn CreateTurnWith(IDice dice)
 {
     var locationFactory = new TraditionalLocationFactory(banker, dice, jailRoster, board, cardDeckFactory);
     board.SetLocations(locationFactory.GetLocations(), locationFactory.GetRailroads(), locationFactory.GetUtilities());
     return new NormalTurn(playerId, dice, jailRoster, board);
 }