public void step()
	{

		// Make sure there is an element left in the solution.
		if (moves.peek() == null)
			return;
		int move = moves.pop();
		switch (move) {
		case Tile.UP:
			moveUp();
			break;
		case Tile.RIGHT:
			moveRight();
			break;
		case Tile.DOWN:
			moveDown();
			break;
		case Tile.LEFT:
			moveLeft();
			break;
		case ROTATE_LEFT:
			rotateLeft();
			break;
		case ROTATE_RIGHT:
			rotateRight();
			break;
		case ACTIVATE:
			activate();
			break;
		}
	}