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

public class Vogel extends Actor
{
    private int speed = -2;
    public void act() 
    {
        this.move(this.speed);
        if(this.isAtEdge()) {
            this.speed = this.speed * -1;
        }
    }    
}