package server.match.levels;

import java.util.ArrayList;
import java.util.List;

import server.match.objects.Ball;

public class Level implements Comparable<Level> {
	private List<Ball> startballs;
	private int time;
	private int num;

	// Contains all the info to start a level
	public Level() {
		this.startballs = new ArrayList<Ball>();
	}

	public void setNum(int num) {
		this.num = num;
	}

	public int getNum() {
		return num;
	}

	public void addBall(Ball b) {
		startballs.add(b);
	}

	public void setTime(int t) {
		time = t;
	}

	public List<Ball> getStartballs() {
		return startballs;
	}

	public int getTime() {
		return time;
	}

	@Override
	public int compareTo(Level l) {
		int rt = 0;
		if (num < l.getNum())
			rt = -1;
		else if (num > l.getNum())
			rt = 1;
		return rt;
	}

}
