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

/**
 * 
 */
public class Biene extends Actor
{
    private String name = "Sabine";
    private int geschwindigkeit;

    /**
     * 
     */
    public Biene()
    {
        this.turn(Greenfoot.getRandomNumber(360));
        this.geschwindigkeit = Greenfoot.getRandomNumber(5) + 1;
    }

    /**
     * 
     */
    public void act()
    {
        this.move(this.geschwindigkeit);
        this.randkollisionUeberpruefen();
        if (this.isTouching(Schmetterling.class)) {
            Schmetterling kollisionsSchmetterling = (Schmetterling)this.getOneIntersectingObject(Schmetterling.class);
            kollisionsSchmetterling.setImage("elefant.png");
        }
    }

    /**
     * 
     */
    public void schwirren()
    {
        this.move(Greenfoot.getRandomNumber(10));
        this.turn(3);
    }

    /**
     * 
     */
    public void boostAktivieren()
    {
        this.geschwindigkeit = 9;
    }

    /**
     * 
     */
    public void energiesparmodusAktivieren()
    {
        this.geschwindigkeit = 1;
    }

    /**
     * 
     */
    public void randkollisionUeberpruefen()
    {
        if (this.isAtEdge()) {
            this.turn(Greenfoot.getRandomNumber(180));
        }
    }

    /**
     * 
     */
    public void namenSagen()
    {
        System.out.println("Ich heiße " + this.name);
    }

    /**
     * 
     */
    public void denEigenenNamenVergessen()
    {
        this.name = "Hab ihn vergessen";
    }
}
