示例#1
0
文件: Resources.cs 项目: Valchris/Tdd
 public bool Subtract(Resources other)
 {
     if(this.Primary >= other.Primary)
     {
         this.Primary = this.Primary - other.Primary;
         return true;
     }
     return false;
 }
示例#2
0
文件: Resources.cs 项目: Valchris/Tdd
 public bool CanAfford(Resources cost)
 {
     return this.Primary >= cost.Primary;
 }