예제 #1
0
        public void ComputeVPs_OnBuildings()
        {
            IPlayer player = new Player();

            player.AddColonist(new Colonist());
            player.AddColonist(new Colonist());
            var smallMarket = new SmallMarket();

            smallMarket.AddWorker(new Colonist());
            player.Build(smallMarket);
            _fortress.AddWorker(new Colonist());
            player.Build(_fortress);

            var vp = _fortress.ComputeVictoryPoints(player);

            Assert.Equal(1, vp);
        }
예제 #2
0
        public void CanUseSmallMarket()
        {
            var player = GetPlayerWithoutPrivilege();

            player.Goods.Add(new Coffee());
            var smallMarket = new SmallMarket();

            smallMarket.AddWorker(new Colonist());
            player.Build(smallMarket);
            ReselectRole();
            var action = new SellGood {
                GoodType = GoodType.Coffee
            };

            CanExecuteActionOnce(action, player);

            Assert.Equal(5, player.Doubloons);
        }
예제 #3
0
        public void CanCombinePrivilegeAndSmallMarketAndLargeMarket()
        {
            var player = RoleOwner;

            player.Goods.Add(new Coffee());
            var largeMarket = new LargeMarket();

            largeMarket.AddWorker(new Colonist());
            player.Build(largeMarket);
            var smallMarket = new SmallMarket();

            smallMarket.AddWorker(new Colonist());
            player.Build(smallMarket);
            ReselectRole();
            var action = new SellGood {
                GoodType = GoodType.Coffee
            };

            CanExecuteActionOnce(action, player);

            Assert.Equal(DoubloonsOnRole + 8, player.Doubloons);
        }