package oving1;

public class StopWatch {
	boolean active = false;
	int time = 0;
	int ticks = 0;
	int lapTime = 0;
	int lap = 0;
	int lastLapTime = -1;

	public StopWatch() {
	}

	boolean isStarted() {
		return active;
	}

	boolean isStopped() {
		return !active;
	}

	int getTicks() {
		return ticks;
	}

	int getTime() {
		return time;
	}

	int getLapTime() {
		return lapTime;
	}

	int getLastLapTime() {
		return lastLapTime;
	}

	void tick(int ticks) {
		this.ticks += ticks;
		if (isStopped()) {
			return;
		}
	}

	void start() {
		active = true;
	}

	void lap() {
		lap += 1;
		lastLapTime = lapTime;
		lapTime = 0;
	}

	void stop() {
		active = false;
	}

	@Override
	public String toString() {
		return "";
	}
}
