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

public class Gaertnerin extends Actor
{
    private int geschwindigkeit = 3;

    public void act() 
    {
        this.tastatuersteuerung();
    }   

    public void tastatuersteuerung() {
        if(Greenfoot.isKeyDown("left")) {
            this.setLocation(this.getX() - this.geschwindigkeit, this.getY());
        }
        if(Greenfoot.isKeyDown("right")) {
            this.setLocation(this.getX() + this.geschwindigkeit, this.getY());
        }
        if(Greenfoot.isKeyDown("up")) {
            this.setLocation(this.getX(), this.getY() - this.geschwindigkeit);
        }
        if(Greenfoot.isKeyDown("down")) {
            this.setLocation(this.getX(), this.getY() + this.geschwindigkeit);
        }
    }
}