I don't know what is wrong with the code
anyone knows?
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
public class R1 extends World
{
Intel Intel = new Intel();
AMD AMD = new AMD();
Incorrecta Incorrecto = new Incorrecta ();
reiniciar reiniciar = new reiniciar ();
Correcta correcto = new Correcta ();
/**
* Constructor for objects of class R1.
*
*/
public R1()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(1000, 750, 1);
addObject(new Intel(),179, 653);
addObject(new AMD(),807, 653);
}
public void act ()
{
if (Greenfoot.mouseClicked(Intel))
{
addObject(Incorrecto,460,338);
addObject(reiniciar,448,164);
}
if (Greenfoot.mouseClicked(AMD))
{
addObject(correcto,460,97);
addObject(reiniciar,448,164);
}
if (Greenfoot.isKeyDown("G"))
{
Greenfoot.setWorld(new Pareo());
}
}
}