How do I make the the string of numbers as a question show up in my game? I want to make the question show up in my game via the level1 method in MathWorld.
Act method in my Question class:
Isn't this already printing the question?
-----------------------------------------
How do I code "if the user is on level1 method in my MathWorld, get random numbers for this.left under 10 and this.right under 10?"
public void act() { System.out.println(String.format("%d %s %d", this.left, this.op.mnemonic,this.right)); }
public void Question(int level) { MathWorld mw = (MathWorld) getWorld(); this.op = ops[Greenfoot.getRandomNumber(numOps)]; this.left = Greenfoot.getRandomNumber(10); this.right = Greenfoot.getRandomNumber(10); }