Ejemplo n.º 1
0
        public void GetPlayerBalanceFromBankShouldEqual1500()
        {
            bank.AddAccount(car, 1500);

            var playerBalance = bank.GetPlayerBalance(car);

            Assert.AreEqual(1500, playerBalance);
        }
Ejemplo n.º 2
0
        public void TestInitiaize()
        {
            banker = new Banker();
            player = new Player("test");

            banker.AddAccount(player, playerDefaultBalance);
        }
Ejemplo n.º 3
0
        public void TestInitialize()
        {
            dice   = new Dice();
            banker = new Banker();
            board  = new Board(banker, dice);
            player = new Player("test");
            owner  = new Player("Owner");
            banker.AddAccount(owner, 1500);

            railRoad1 = new RailRoadProperty(5, banker, "railRoad1", 200);
            railRoad2 = new RailRoadProperty(15, banker, "railRoad2", 200);
            railRoad3 = new RailRoadProperty(25, banker, "railRoad3", 200);
            railRoad4 = new RailRoadProperty(35, banker, "railRoad4", 200);
            var groupedSpaces = new List <IOwnableProperty>()
            {
                railRoad1, railRoad2, railRoad3, railRoad4
            };

            railRoad1.GroupedSpaces = groupedSpaces;
            railRoad2.GroupedSpaces = groupedSpaces;
            railRoad3.GroupedSpaces = groupedSpaces;
            railRoad4.GroupedSpaces = groupedSpaces;

            dice.Roll();
        }
Ejemplo n.º 4
0
        public void TestInitialize()
        {
            player    = new Player("player");
            banker    = new Banker();
            incomeTax = new IncomeTax(2, banker, "IncomeTax");

            banker.AddAccount(player, 500);
        }
Ejemplo n.º 5
0
        public void TestInitialize()
        {
            banker = new Banker();
            go     = new Go(0, banker, "Go");
            player = new Player("player");

            banker.AddAccount(player, 1500);
        }
Ejemplo n.º 6
0
        public void TestInitialize()
        {
            player    = new Player("player");
            banker    = new Banker();
            luxuryTax = new LuxuryTax(2, banker, "LuxuryTax");

            banker.AddAccount(player, 500);
        }
Ejemplo n.º 7
0
        public IPlayer CreatePlayerAccount(String name)
        {
            if (players.Count() < 9)
            {
                var player = new Player(name);
                players.Add(player);
                banker.AddAccount(player, defaultPlayerBalance);

                return(player);
            }

            return(null);
        }
Ejemplo n.º 8
0
        public void PlayerAccountSuccessfullyCreated()
        {
            var newPlayer = new Player("newPlayer");

            banker.AddAccount(newPlayer, 9999);

            Assert.AreEqual(9999, banker.GetPlayerBalance(newPlayer));
        }
Ejemplo n.º 9
0
        public void TestInitialize()
        {
            dice   = new Dice();
            banker = new Banker();
            board  = new Board(banker, dice);
            player = new Player("player");
            owner  = new Player("Owner");
            banker.AddAccount(player, 1500);
            banker.AddAccount(owner, 1500);

            ownable1 = new OwnableProperty(5, banker, "ownable1", 50, 25);
            ownable2 = new OwnableProperty(15, banker, "ownable2", 50, 25);
            ownable3 = new OwnableProperty(25, banker, "ownable3", 50, 25);
            ownable4 = new OwnableProperty(35, banker, "ownable4", 50, 25);
            var groupedSpaces = new List <IOwnableProperty>()
            {
                ownable1, ownable2, ownable3, ownable4
            };

            ownable1.GroupedSpaces = groupedSpaces;
            ownable2.GroupedSpaces = groupedSpaces;
            ownable3.GroupedSpaces = groupedSpaces;
            ownable4.GroupedSpaces = groupedSpaces;
        }
Ejemplo n.º 10
0
        public void TestInitialize()
        {
            dice   = new Dice();
            banker = new Banker();
            board  = new Board(banker, dice);
            player = new Player("test");
            owner  = new Player("Owner");
            banker.AddAccount(owner, 500);

            utility1 = new UtilityProperty(12, banker, "utility1", 150, dice);
            utility2 = new UtilityProperty(28, banker, "utility2", 150, dice);
            var groupedSpaces = new List <IOwnableProperty>()
            {
                utility1, utility2
            };

            utility1.GroupedSpaces = groupedSpaces;
            utility2.GroupedSpaces = groupedSpaces;

            dice.Roll();
        }