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); }
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); }
protected Player(decimal cash) { Mobility = new Mobility(SameDiceMax, UnfreezeAttempts); Patrimony = new Patrimony(cash); }
public bool Exchange(Property sellerProperty, IPatrimony buyer) { return(Exchange(sellerProperty, sellerProperty.BuyPrice, buyer)); }