public static boolean wallAt(State s, ObjectInstance r, int x, int y){
		
		int top = r.getDiscValForAttribute(ATTTOP);
		int left = r.getDiscValForAttribute(ATTLEFT);
		int bottom = r.getDiscValForAttribute(ATTBOTTOM);
		int right = r.getDiscValForAttribute(ATTRIGHT);
		
		//agent along wall of room check
		if(((x == left || x == right) && y >= bottom && y <= top) || ((y == bottom || y == top) && x >= left && x <= right)){
			
			//then only way for this to be a valid pos is if a door contains this point
			ObjectInstance door = doorContainingPoint(s, x, y);
			if(door == null){
				return true;
			}
			
		}
		
		return false;
	}