"""Static Monopoly board data — all 40 squares.""" SQUARES = [ {"id": 0, "name": "Go", "type": "safe", "cost": 0, "group": None}, {"id": 1, "name": "Mediterranean Ave.", "type": "property", "cost": 60, "group": "purple", "rent": [2, 10, 30, 90, 160, 250]}, {"id": 2, "name": "Community Chest", "type": "cc", "cost": 0, "group": None}, {"id": 3, "name": "Baltic Ave.", "type": "property", "cost": 60, "group": "purple", "rent": [4, 20, 60, 180, 320, 450]}, {"id": 4, "name": "Income Tax", "type": "tax", "cost": 0, "group": None}, {"id": 5, "name": "Reading Railroad", "type": "railroad", "cost": 200, "group": "railroad"}, {"id": 6, "name": "Oriental Ave.", "type": "property", "cost": 100, "group": "lightblue", "rent": [6, 30, 90, 270, 400, 550]}, {"id": 7, "name": "Chance", "type": "chance", "cost": 0, "group": None}, {"id": 8, "name": "Vermont Ave.", "type": "property", "cost": 100, "group": "lightblue", "rent": [6, 30, 90, 270, 400, 550]}, {"id": 9, "name": "Connecticut Ave.", "type": "property", "cost": 120, "group": "lightblue", "rent": [8, 40, 100, 300, 450, 600]}, {"id": 10, "name": "Just Visiting", "type": "jail", "cost": 0, "group": None}, {"id": 11, "name": "St. Charles Place", "type": "property", "cost": 140, "group": "pink", "rent": [10, 50, 150, 450, 625, 750]}, {"id": 12, "name": "Electric Company", "type": "utility", "cost": 150, "group": "utility"}, {"id": 13, "name": "States Ave.", "type": "property", "cost": 140, "group": "pink", "rent": [10, 50, 150, 450, 625, 750]}, {"id": 14, "name": "Virginia Ave.", "type": "property", "cost": 160, "group": "pink", "rent": [12, 60, 180, 500, 700, 900]}, {"id": 15, "name": "Pennsylvania Railroad", "type": "railroad", "cost": 200, "group": "railroad"}, {"id": 16, "name": "St. James Place", "type": "property", "cost": 180, "group": "orange", "rent": [14, 70, 200, 550, 750, 950]}, {"id": 17, "name": "Community Chest", "type": "cc", "cost": 0, "group": None}, {"id": 18, "name": "Tennessee Ave.", "type": "property", "cost": 180, "group": "orange", "rent": [14, 70, 200, 550, 750, 950]}, {"id": 19, "name": "New York Ave.", "type": "property", "cost": 200, "group": "orange", "rent": [16, 80, 220, 600, 800, 1000]}, {"id": 20, "name": "Free Parking", "type": "safe", "cost": 0, "group": None}, {"id": 21, "name": "Kentucky Ave.", "type": "property", "cost": 220, "group": "red", "rent": [18, 90, 250, 700, 875, 1050]}, {"id": 22, "name": "Chance", "type": "chance", "cost": 0, "group": None}, {"id": 23, "name": "Indiana Ave.", "type": "property", "cost": 220, "group": "red", "rent": [18, 90, 250, 700, 875, 1050]}, {"id": 24, "name": "Illinois Ave.", "type": "property", "cost": 240, "group": "red", "rent": [20, 100, 300, 750, 925, 1100]}, {"id": 25, "name": "B&O Railroad", "type": "railroad", "cost": 200, "group": "railroad"}, {"id": 26, "name": "Atlantic Ave.", "type": "property", "cost": 260, "group": "yellow", "rent": [22, 110, 330, 800, 975, 1150]}, {"id": 27, "name": "Ventnor Ave.", "type": "property", "cost": 260, "group": "yellow", "rent": [22, 110, 330, 800, 975, 1150]}, {"id": 28, "name": "Water Works", "type": "utility", "cost": 150, "group": "utility"}, {"id": 29, "name": "Marvin Gardens", "type": "property", "cost": 280, "group": "yellow", "rent": [24, 120, 360, 850, 1025, 1200]}, {"id": 30, "name": "Go to Jail", "type": "gotojail", "cost": 0, "group": None}, {"id": 31, "name": "Pacific Ave.", "type": "property", "cost": 300, "group": "green", "rent": [26, 130, 390, 900, 1100, 1275]}, {"id": 32, "name": "North Carolina Ave.", "type": "property", "cost": 300, "group": "green", "rent": [26, 130, 390, 900, 1100, 1275]}, {"id": 33, "name": "Community Chest", "type": "cc", "cost": 0, "group": None}, {"id": 34, "name": "Pennsylvania Ave.", "type": "property", "cost": 320, "group": "green", "rent": [28, 150, 450, 1000, 1200, 1400]}, {"id": 35, "name": "Short Line Railroad", "type": "railroad", "cost": 200, "group": "railroad"}, {"id": 36, "name": "Chance", "type": "chance", "cost": 0, "group": None}, {"id": 37, "name": "Park Place", "type": "property", "cost": 350, "group": "darkblue", "rent": [35, 175, 500, 1100, 1300, 1500]}, {"id": 38, "name": "Luxury Tax", "type": "tax", "cost": 0, "group": None}, {"id": 39, "name": "Boardwalk", "type": "property", "cost": 400, "group": "darkblue", "rent": [50, 200, 600, 1400, 1700, 2000]}, ] # Map square names (lowercase, stripped) to square IDs for lookup NAME_TO_ID = {} for sq in SQUARES: # The game uses short names like "Mediterranean" not "Mediterranean Ave." # Build multiple lookup keys name = sq["name"].lower() NAME_TO_ID[name] = sq["id"] # Also without trailing punctuation NAME_TO_ID[name.rstrip(".")] = sq["id"] # Also first word for some parts = name.split() if len(parts) > 1 and sq["type"] in ("property", "railroad", "utility"): NAME_TO_ID[parts[0]] = sq["id"] # The monop game uses these exact short names (from bsdgames source): MONOP_NAMES = { "go": 0, "mediterranean": 1, "community chest": 2, "baltic": 3, "income tax": 4, "reading": 5, "oriental": 6, "chance": 7, "vermont": 8, "connecticut": 9, "just visiting": 10, "jail": 10, "st. charles": 11, "electric co.": 12, "electric company": 12, "states": 13, "virginia": 14, "pennsylvania rr": 15, "pennsylvania railroad": 15, "st. james": 16, "community chest ": 17, "tennessee": 18, "new york": 19, "free parking": 20, "kentucky": 21, "chance ": 22, "indiana": 23, "illinois": 24, "b&o": 25, "b&o railroad": 25, "atlantic": 26, "ventnor": 27, "water works": 28, "marvin gardens": 29, "go to jail": 30, "pacific": 31, "north carolina": 32, "community chest ": 33, "pennsylvania": 34, "short line": 35, "short line railroad": 35, "chance ": 36, "park place": 37, "luxury tax": 38, "boardwalk": 39, } NAME_TO_ID.update(MONOP_NAMES)