import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Math here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Math extends Enemy
{
/**
* Act - do whatever the Math wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
// Add your action code here.
problem();
}
public void problem()
{
int a = 0;
while(a < 10)
{
setImage(new GreenfootImage("What is 2 x " + a , 50, Color.WHITE, Color.BLACK));
a++;
}
}
}
