Exemple #1
0
 public void Setup()
 {
     _hundredProperty    = new Land("100", 100, Color.Aqua);
     _twoHundredProperty = new Land("200", 200, Color.Aqua);
     _seller             = new Patrimony(SellerCash);
     _buyer = new Patrimony(BuyerCash);
 }
Exemple #2
0
        public bool Exchange(Property sellerProperty, decimal price, IPatrimony buyer)
        {
            var seller = this;

            if (!buyer.Debit(price))
            {
                return(false);
            }
            seller.Credit(price);

            if (!seller.Debit(sellerProperty))
            {
                return(false);
            }
            buyer.Credit(sellerProperty);

            return(true);
        }
Exemple #3
0
 protected Player(decimal cash)
 {
     Mobility  = new Mobility(SameDiceMax, UnfreezeAttempts);
     Patrimony = new Patrimony(cash);
 }
Exemple #4
0
 public bool Exchange(Property sellerProperty, IPatrimony buyer)
 {
     return(Exchange(sellerProperty, sellerProperty.BuyPrice, buyer));
 }