Exemple #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());
 }
 public TraditionalLocationFactory(TraditionalBanker banker, IDice dice, 
     TraditionalJailRoster jailRoster, IBoard board,
     CardDeckFactory cardDeckFactory)
 {
     this.banker = banker;
     this.dice = dice;
     this.jailRoster = jailRoster;
     this.board = board;
     this.cardDeckFactory = cardDeckFactory;
 }
Exemple #3
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);
 }