Beispiel #1
0
        public void Land(IPlayer player, Int32 position)
        {
            CheckForBankrupcies();

            var ownableSpace = allOwnableSpaces[position];
            var money        = banker.Money[player];

            if (Owned(ownableSpace))
            {
                PayRent(player, ownableSpace);
            }
            else if (banker.CanAfford(player, ownableSpace.Price) && player.OwnableStrategy.ShouldBuy(money))
            {
                Buy(player, ownableSpace);
            }
        }
Beispiel #2
0
        public Boolean PlayerWillPayToGetOutOfJail(IPlayer player)
        {
            var money = banker.Money[player];

            return(player.JailStrategy.ShouldPay(money) && banker.CanAfford(player, GameConstants.COST_TO_GET_OUT_OF_JAIL));
        }