Restored border control code that got removed.
Instead of the getSquareXOf methods return a null MapSquare, they now return a default MapSquare with the coordinates (-1, -1).  Instead of checking for null values, the RoomTool now checks the isInBounds() method on the MapSquare which returns true so long as the coordinates are positive integers.