Hello!
i am having some issues with this code.
Just started learning how to program in Greenfoot, and i want to create a animation where when the actor reaches the edge, the color (picture) changes.
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Circle here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Circle extends Actor
{
public int pic;
public Circle (int way)
{
setRotation (way);
pic = 0;
}
public void act()
{
move(10);
if(isAtEdge())
{turn(153);}
changeColor();
}
public void changeColor()
{
pic ++;
if (pic == 5)
{
pic = 0;
}
setImage ("Color0" + pic + ".png" );
}
}
The program compiles and while running occurs a debbug, stating that there's an error in line 27 and 40.

