sc2simulator/setup/mapLocations.py
def isValidLoc(loc, dimensions, pad=30):
    """whether loc is valid given map's dimensions"""
    x, y, z = loc
    maxX, maxY, maxZ  = dimensions
    maxX -= pad
    maxY -= pad
    maxZ -= pad
    return x >= pad and x <= maxX and y >= pad and y <= maxY
whether loc is valid given map's dimensions
whether loc is valid given map's dimensions
whether loc is valid given map ' s dimensions
def isValidLoc(loc, dimensions, pad=30):
    x, y, z = loc
    maxX, maxY, maxZ  = dimensions
    maxX -= pad
    maxY -= pad
    maxZ -= pad
    return x >= pad and x <= maxX and y >= pad and y <= maxY
def isValidLoc ( loc , dimensions , pad = 30 ) : x , y , z = loc maxX , maxY , maxZ = dimensions maxX -= pad maxY -= pad maxZ -= pad return x >= pad and x <= maxX and y >= pad and y <= maxY
whether loc is valid given map's dimensions
whether loc is valid given map ' s dimensions
"""whether loc is valid given map's dimensions"""
loc
dimensions
pad