public void Initialize() { this.fakeDice = new FakeDice(); this.player = new Player("Horse"); this.board = new ClassicBoard(); this.turn = new Turn(this.fakeDice, this.player, this.board); }
public JailTests() { player = new Player("Name", 1500); player.BuyingStrategy = new NeverBuyStrategy(); goToJail = new GoToJail(ClassicBoard.GoToJailLocation, ClassicBoard.JailLocation); dice = new FakeDice(); turn = new Turn(dice, player, new ClassicBoard()); }
public void SetUp() { var faker = new MotherFaker(); jailRoster = faker.JailRoster; banker = faker.Banker; gameBoard = faker.GameBoard; dice = faker.Dice; PutPlayerInJail(); }
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()); }
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()); }
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()); }
private void PlayerTakesTurnRollingA(Int32 roll) { dice = new FakeDice(new[] { new FakeRoll(roll, 0) }); var turn = new NormalTurn(playerId, dice, jailRoster, board); turn.Take(); }
public void TestPlayerThrowsNonDoublesLandsOnGoToJailWithBalanceNotChangingAndTurnIsOver() { var fakeDice = new FakeDice(new [] { new FakeRoll(30, 0) }); var turn = CreateTurnWith(fakeDice); turn.Take(); Assert.That(banker.GetBalanceFor(playerId), Is.EqualTo(1500)); Assert.That(board.GetLocationIndexFor(playerId), Is.EqualTo(10)); }