Newer
Older
private int number;
private Position front,back;
private Orientation orientation;
/**
* Move the car forward
* @param board the board on which apply the changes
* @param nbSteps the number of steps this car will move
* @throws RuntimeException If the number of steps is too high
*/
public void moveForward(int[][] board, int nbSteps) throws RuntimeException
{
if(this.getNbMovesForward(board) < nbSteps)
throw new RuntimeException("Illegal number of steps!");
//TODO
}
public int getNbMovesForward(int[][] board)
{
return 0;
}
public Position getFront() {
return front;
}
public Position getBack() {
return back;
}
public Orientation getOrientation() {
return orientation;
}
public enum Orientation {
HORIZONTAL, VERTICAL;
}