package org.academiadecodigo.carcrash.cars;

/**
 * MIT License
 * (c) 2017 Ricardo Constantino
 */

public class Beetle extends Car {
    private int steps;

    public Beetle() {
        super(Brand.BEETLE);
        this.steps = 0;
    }

    @Override
    public void move() {
        if (isCrashed()) { return; }
        if (this.steps % 2 == 0) {
            setDirection(getPos().move(getNewOrientation(),1));
        }
        this.steps++;
    }
}
