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

public class Dancer extends Actor
{
    public void act() 
    {
        this.tastensteuerung();
    }   

    public void tastensteuerung() {
        if(Greenfoot.isKeyDown("a")) {
            this.setLocation(this.getX() - 5, this.getY());
        }
        if(Greenfoot.isKeyDown("d")) {
            this.setLocation(this.getX() + 5, this.getY());
        }
    }
}