I have code where im trying to make it so a certain variation of the simulation runs depending on the temperature and i am getting an error with the if statements. These are in one of the worlds - beeWorld.
i have weatherValue defined in the code aswell as this:
Does anyone know how to fix this error?
public void runSimulation()
{
if(weatherValue >= -40 || weatherValue <= 15)
{
//if weatherValue is between -40 and 15 then run the low temperature simulation
lowTemperature();
} else if(weatherValue >= 16 || weatherValue <= 25)
{
//if weatherValue is between 16 and 25 then run the regular temperature simulation
regularTemperature();
} else if(weatherValue >= 26 || weatherValue <= 40)
{
//if weatherValue is between 26 and 40 then run the high temperature simulation
highTemperature();
} else {
//if values arent set, bring back the main menu
Greenfoot.setWorld(new mainMenu());
}
}weatherInput weatherValue;

