public void TowerCreateMageTest() { _sut = new MageCreator(1, 10, "Offensive"); tower = _sut.createTower(); Assert.Equal(10, tower.GetDamage()); }
public void TowerCreateBankTest() { _sut = new BankCreator(10, "Offensive"); tower = _sut.createTower(); Assert.Equal(10, tower.GetMoney()); }
public void TowerMoneyUpTest() { _sut = new BankCreator(10, "Offensive"); tower = _sut.createTower(); MoneyUpgrade towerMoneyUp = new MoneyUpgrade(tower); Assert.Equal(1010, towerMoneyUp.GetMoney()); }
public void TowerRangeUpTest() { _sut = new BomberCreator(1, 10, "Offensive"); tower = _sut.createTower(); RangeUpgrade towerRangeUp = new RangeUpgrade(tower); Assert.Equal(11, towerRangeUp.GetRange()); }
public void TowerDamageUpTest() { _sut = new BomberCreator(1, 10, "Offensive"); tower = _sut.createTower(); DamageUpgrade towerDmgUp = new DamageUpgrade(tower); Assert.Equal(120, towerDmgUp.GetDamage()); }
public void createTower(string tower) { if (gameMenu.currentSelectedTower != null) { gameMenu.currentSelectedTower.deSelected(); } selectedTower = towerInfo.getTowerGameObject(tower); int towerCost = TowerInfo.getTowerCost(tower); int curMoney = gameManager.getCurMoney(); if (curMoney - towerCost >= 0) { towerCreator.createTower(selectedTower); } else { // TODO: Display error info on menu! } }