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