Generate a random point outside a given rectangle within a map
Python 2, 114 106 102 101 bytes



lambda w,h,X,Y,W,H:choice([(i%w,i/w)for i in range(w*h)if(W&gt;i%w-X&gt;-1&lt;i/w-Y&lt;H)&lt;1])
from random import*


Try it online!