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

/**
 * 
 */
public class Auto extends Actor
{
    private int aktuellerGang = 1;
    private int geschwindigkeit = 0;
    private String marke;
    private boolean fernlichtIstAn = false;
    private double verbrauch;

    /**
     * 
     */
    public void act()
    {
        this.move(this.aktuellerGang);
        if (this.isAtEdge()) {
            this.turn(Greenfoot.getRandomNumber(180));
        }
        if (Greenfoot.isKeyDown("1")) {
            this.aktuellerGang = 1;
        }
        if (Greenfoot.isKeyDown("2")) {
            this.aktuellerGang = 2;
        }
        if (Greenfoot.isKeyDown("3")) {
            this.aktuellerGang = 3;
        }
        if (Greenfoot.isKeyDown("4")) {
            this.aktuellerGang = 4;
        }
        if (Greenfoot.isKeyDown("s")) {
            this.aktuellerGang = 50;
        }
        if (Greenfoot.isKeyDown("r")) {
            this.aktuellerGang = -1;
        }
    }
}
