Make a building fit the map in any turn and still touch a road
A wide building that is turned sideways suddenly covers other tiles, hangs over the edge or ends up only touching a road at its corner. Here is how to check a placement properly and how to tell the player which rule they broke.
Why this works
A turned building is the same shape on different cells, so first work out exactly which cells it covers and only then ask the rules about those cells. Asking in a fixed order, most basic reason first, means the player always hears one clear reason a spot is refused.
When not to use it
Wrong for maps that are not made of square cells, such as free placement or hexagons, where covering cells and touching a road mean something else. If buildings never turn or all fill a single cell, a much simpler check is enough.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 27 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Make a building fit the map in any turn and still touch a road" (read_entry building-footprint-placement-check) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP