// WARNING: This file is auto-generated and any changes to it will be overwritten
import java.util.*;
import greenfoot.*;

/**
 * 
 */
public class Fliege extends Actor
{
    private int geschwindigkeit;
    private int anzahlGegessenerBlumen = 0;
    private int statusmeldungPositionX = 450;
    private int statusmeldungPositionY = 40;
    private boolean bremseBenutzt = false;
    private int wieOftAmRandAngestossen;
    private String name;

    /**
     * 
     */
    public Fliege()
    {
        this.geschwindigkeit = 1;
        this.name = "heini";
    }

    /**
     * 
     */
    public void act()
    {
        this.move(this.geschwindigkeit);
        if (Greenfoot.isKeyDown("left")) {
            this.turn(-3);
        }
        if (Greenfoot.isKeyDown("right")) {
            this.turn(3);
        }
        if (this.isAtEdge()) {
            this.wieOftAmRandAngestossen = this.wieOftAmRandAngestossen + 1;
        }
        if (this.wieOftAmRandAngestossen != 0) {
            System.out.println("Du bist mindestens einmal am Rand angestoßen");
        }
    }
}
