コード例 #1
0
ファイル: Trade.cs プロジェクト: CabinStudios/Strategy_game
 public bool DoAgreement()
 {
     if (buyer.GetWallet().CanPay(price) && desire.Satisfy(seller.GetStorage()))
     {
         buyer.GetWallet().Pay(price, seller.GetWallet());
         buyer.Satisfy(desire.GetPositiveImpact());
         return(true);
     }
     else
     {
         return(false);
     }
 }