Esempio n. 1
0
 public void BuildTowerIn(TowerCell towerCell, ITower tower, int cost)
 {
     if (!CanBuildTowerIn(towerCell, tower, cost))
     {
         return;
     }
     towerCell.Build(tower.Clone() as ITower);
     Gold -= cost;
 }
Esempio n. 2
0
 public bool CanBuildTowerIn(TowerCell towerCell, ITower tower, int cost)
 => Cells.Contains(towerCell) && (towerCell?.Buildable ?? false) && cost <= Gold;