public UtilityTests() { dice = new Dice(); hat = "Hat"; var banker = new Banker(new[] { hat }); var propertyManager = new PropertyManager(); electricCompany = new Utility( ClassicBoardFactory.ElectricCompanyIndex, ClassicBoardFactory.UtilityPrice, ClassicBoardFactory.UtilityGroup, banker, propertyManager, dice); waterWorks = new Utility( ClassicBoardFactory.WaterWorksIndex, ClassicBoardFactory.UtilityPrice, ClassicBoardFactory.UtilityGroup, banker, propertyManager, dice); propertyManager.ManageProperties(new[] { electricCompany, waterWorks }); }
public PropertyManagerTests() { horse = "Horse"; hat = "Hat"; var banker = new Banker(new[] { horse, hat }); propertyManager = new PropertyManager(); properties = ClassicBoardFactory.CreateProperties(banker, propertyManager); propertyManager.ManageProperties(properties); }
public static Game Create(IEnumerable<String> players) { var dice = new Dice(); var banker = new Banker(players); var propertyManager = new PropertyManager(); var properties = ClassicBoardFactory.CreateProperties(banker, propertyManager); propertyManager.ManageProperties(properties); var board = ClassicBoardFactory.CreateBoard(dice, new[] { new ClassicGoBonusRule(banker) }, properties, banker, players); var turnTaker = new ClassicTurn(dice, board, banker, propertyManager); return new Game(players, turnTaker, new GuidShuffler<String>()); }
public void Initialize() { mockDice = new Mock<Dice>(); mockDice.Setup(m => m.RollDie()).Returns(() => dieValues.Dequeue()); horse = "Horse"; banker = new Banker(new[] { horse }); var propertyManager = new PropertyManager(); properties = ClassicBoardFactory.CreateProperties(banker, propertyManager); propertyManager.ManageProperties(properties); mockBoard = new Mock<IBoard>(); turn = new ClassicTurn(mockDice.Object, mockBoard.Object, banker, propertyManager); }
public RailroadTests() { hat = "Hat"; horse = "Horse"; banker = new Banker(new[] { hat, horse }); var propertyManager = new PropertyManager(); readingRailroad = new Railroad( ClassicBoardFactory.ReadingRailroadIndex, ClassicBoardFactory.RailroadPrice, ClassicBoardFactory.BaseRailroadRent, ClassicBoardFactory.RailroadGroup, banker, propertyManager); pennsylvaniaRailroad = new Railroad( ClassicBoardFactory.PennsylvaniaRailroadIndex, ClassicBoardFactory.RailroadPrice, ClassicBoardFactory.BaseRailroadRent, ClassicBoardFactory.RailroadGroup, banker, propertyManager); boRailroad = new Railroad( ClassicBoardFactory.BoRailroadIndex, ClassicBoardFactory.RailroadPrice, ClassicBoardFactory.BaseRailroadRent, ClassicBoardFactory.RailroadGroup, banker, propertyManager); shortLine = new Railroad( ClassicBoardFactory.IncomeTaxIndex, ClassicBoardFactory.RailroadPrice, ClassicBoardFactory.BaseRailroadRent, ClassicBoardFactory.RailroadGroup, banker, propertyManager); propertyManager.ManageProperties(new[] { readingRailroad, pennsylvaniaRailroad, boRailroad, shortLine }); }