private bool checkConditionValue(Condition c) { //data[0] contains a string for the type of value to check, data[1] contains the number. string[] data = c.getValue().Split(':'); //Debug.Log(data[0] + ", " + data[1]); if (data[0].Equals("Population")) { if (int.Parse(data[1]) < tower.getPopulation()) { return(true); } } else if (data[0].Equals("Highest Floor")) { if (int.Parse(data[1]) < tower.getHighestFloor()) { return(true); } } else if (data[0].Equals("Human Population")) { if (int.Parse(data[1]) < tower.getHumanPop()) { return(true); } } else if (data[0].Equals("Result")) { } return(false); }
public void increasePopulation(int i) { tower.setTotalPopulation(tower.getPopulation() + i); }