예제 #1
0
 public void SetUp()
 {
     playerOneId = 0;
     playerTwoId = 1;
     dice = new FakeDice(new [] { new FakeRoll(7, 3) });
     banker = new TraditionalBanker(new [] { playerOneId, playerTwoId });
     var utilities = new List<Utility>();
     electric = new Utility(12, "Electric Company", 150, 0, banker, utilities, dice);
     waterWorks = new Utility(28, "Water Works", 150, 0, banker, utilities, dice);
     utilities.AddRange(new Utility[] { electric, waterWorks });
 }
예제 #2
0
        public override IEnumerable<Utility> GetUtilities()
        {
            var utilities = new List<Utility>();
            var electric = new Utility(12, "Electric Company", 150, 0, banker, utilities, dice);
            var waterWorks = new Utility(28, "Water Works", 150, 0, banker, utilities, dice);

            utilities.AddRange(new Utility[]
            {
                electric,
                waterWorks
            });

            return utilities;
        }
예제 #3
0
        public void TestSetLocationsBuildsLocationsList()
        {
            var board = new GameBoard(banker);
            var location = new NullLocation(0, "null");
            var railroad = new Railroad(1, "railroad", 10, 10, banker, new Railroad[] {});
            var utility = new Utility(2, "utility", 10, 10, banker, new Utility[] {}, new FakeDice());
            board.SetLocations(new Location[] { location }, new Railroad[] { railroad }, new Utility[] { utility });

            Assert.That(board.Locations.Count(), Is.EqualTo(3));
        }