import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot und MouseInfo)

public class Sonne extends Actor
{

    public void act() 
    {
        this.move(-1);
        if(this.isAtEdge()) {
            this.setLocation(1279, this.getY());
        }
    }    
}