Checks whether a position is allowed or not.
true if the position is allowed
the x coordinate
the y coordinate