I'm not sure how to write code to check an input is between 3 and 25 and if they are not then an object would be added into my world. If anyone could help that would be nice.
This is the code that I set what the input will be:
public class beeInput extends Actor
{
//create variable
int beeValue;
boolean error;
/**
* Act - do whatever the beeInput wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
//Create input box, ask for value, set bounds for beeValue
setImage(new GreenfootImage("Input.png"));
//set value of bees based off the input
if(Greenfoot.mouseClicked(this)){
beeValue = Integer.parseInt(Greenfoot.ask("Please input a value for the amount of bees"));
}
}
}

