Where does coding stop, and rules start?

Main Street is coming along, and I able to move past a real thorny IsFaceExpired issue. Beyond that, I was able to also move on to a related a corner case issue, when one blink has to interact with two other blinks, at the same time.

That said, that only takes care of those corner cases, when the Main Street, proper, is built according the set-up that I dictate. Namely, that the Grocery Store is next to Urgent Care, and the Library is next to the Urgent Care, and the Post Office is next to the Library.

All in line, Grocery, Doctor, Library, Post, left to right.

And I’ve coded the game to this. EXACTLY this.

Do I need to program for the instance where a set-up puts Grocery next to Library ?

In Poker, no one continues play if there is a misdeal. No one starts a game of Chess with 9 pawns.

Is this always a judgement call? Is it more Art than Science? I mean, I could program Main Street to allow for Grocery next to Library. But when does it stop? For that matter, I could write code for buildings that aren’t in the original four here, that never even get “built” in set-up.

Well, what you have to ask is: What are the rules for your game? Then you implement those. Your setup problem is usually solved by some type of heuristic where you have a general set of rules but, other than that, you simply randomly assign things as much as possible so you can create diversity.