ArrayList<State> legalMoves(int height, int width) {
		//System.out.println("height: " + height + " width " + width);
		
		ArrayList<State> l = new ArrayList<State>();
		if (curPos.x + 1 <= height)
			l.add(new State(new Point(curPos.x + 1,curPos.y),this, dirt, bumps));
		if (curPos.x - 1 > 0)                                         
			l.add(new State(new Point(curPos.x - 1,curPos.y),this, dirt, bumps));
		if (curPos.y + 1 <= width)                                      
			l.add(new State(new Point(curPos.x,curPos.y + 1),this, dirt, bumps));
		if (curPos.y - 1 > 0)                                         
			l.add(new State(new Point(curPos.x,curPos.y - 1),this, dirt, bumps));
	
		for (int i = 0; i < l.size(); i++)
			if (bumps.contains(l.get(i).curPos)) {
				l.remove(i);
				i--;
			}
				
		for (State s : l)
			if (dirt.contains(s.curPos))
				s.dirt.remove(s.curPos);
		return l;
	}