public void Setup() { player = new Player("Player"); var players = new[] { player }; dice = new ControlledDice(); var realEstateHandler = FakeHandlerFactory.CreateEmptyRealEstateHandler(players); landableSpaces = new Dictionary <Int32, UnownableSpace>(); for (var i = 0; i < BoardConstants.BOARD_SIZE; i++) { landableSpaces.Add(i, new LandableSpace()); } space6 = landableSpaces[6] as LandableSpace; space10 = landableSpaces[10] as LandableSpace; var spaceHandler = new UnownableHandler(landableSpaces); banker = new Banker(players); boardHandler = new BoardHandler(players, realEstateHandler, spaceHandler, banker); jailHandler = new JailHandler(dice, boardHandler, banker); turnHandler = new TurnHandler(dice, boardHandler, jailHandler, realEstateHandler, banker); }
public TurnHandler(IDice dice, IBoardHandler boardHandler, IJailHandler jailHandler, IOwnableHandler realEstateHandler, IBanker banker) { this.dice = dice; this.boardHandler = boardHandler; this.jailHandler = jailHandler; this.realEstateHandler = realEstateHandler; this.banker = banker; }
public DeckFactory(IEnumerable<IPlayer> players, IJailHandler jailHandler, IBoardHandler boardHandler, IOwnableHandler realEstateHandler, IBanker banker) { random = new Random(); this.jailHandler = jailHandler; this.players = players; this.boardHandler = boardHandler; this.realEstateHandler = realEstateHandler; this.banker = banker; }
public DeckFactory(IEnumerable <IPlayer> players, IJailHandler jailHandler, IBoardHandler boardHandler, IOwnableHandler realEstateHandler, IBanker banker) { random = new Random(); this.jailHandler = jailHandler; this.players = players; this.boardHandler = boardHandler; this.realEstateHandler = realEstateHandler; this.banker = banker; }
public void SetupPlayerWithStrategy() { dice = new ControlledDice(); player = new Player("name"); var players = new[] { player }; banker = new Banker(players); var realEstateHandler = FakeHandlerFactory.CreateEmptyRealEstateHandler(players); boardHandler = FakeHandlerFactory.CreateBoardHandlerForFakeBoard(players, realEstateHandler, banker); jailHandler = new JailHandler(dice, boardHandler, banker); }
public void Setup() { player = new Player("name"); var players = new[] { player }; var dice = new ControlledDice(); banker = new Banker(players); var realEstateHandler = FakeHandlerFactory.CreateEmptyRealEstateHandler(players); var boardHandler = FakeHandlerFactory.CreateBoardHandlerForFakeBoard(players, realEstateHandler, banker); jailHandler = new JailHandler(dice, boardHandler, banker); getOutOfJailCard = new GetOutOfJailFreeCard(jailHandler); }
public GetOutOfJailFreeCard(IJailHandler jailHandler) { this.jailHandler = jailHandler; }
public GoToJailCard(IJailHandler jailHandler) { this.jailHandler = jailHandler; }
public void Setup() { player = new Player("Player"); var players = new[] { player }; dice = new ControlledDice(); var realEstateHandler = FakeHandlerFactory.CreateEmptyRealEstateHandler(players); landableSpaces = new Dictionary<Int32, UnownableSpace>(); for (var i = 0; i < BoardConstants.BOARD_SIZE; i++) landableSpaces.Add(i, new LandableSpace()); space6 = landableSpaces[6] as LandableSpace; space10 = landableSpaces[10] as LandableSpace; var spaceHandler = new UnownableHandler(landableSpaces); banker = new Banker(players); boardHandler = new BoardHandler(players, realEstateHandler, spaceHandler, banker); jailHandler = new JailHandler(dice, boardHandler, banker); turnHandler = new TurnHandler(dice, boardHandler, jailHandler, realEstateHandler, banker); }