4 ms·
> Try a European or Asian city with lots of twisty roads and alleys and it gets much harder. I showed what would happen if you literally follow the rule "whene
by logicallee 8y ago
> Try a European or Asian city with lots of twisty roads and alleys and it gets much harder.
I showed what would happen if you literally follow the rule "whenever [...] there's enough room on a visible street to put a label, then put the label".
That's the specification. If you show me a twisty road with no room for a label, then according to this specification it doesn't get the label. The specification (for what we're testing) says "whenever there is room". Whenever there is enough whitespace on the road.
- alphakappa 8y agoThat’s a misunderstanding of the spec. The ask is to put in at least one label if there is space (when previously there were none). Filling all available space with redundant labels is not the ask.
- logicallee 8y agoOK, mine is the result of running this pseudocode: # Label all streets as much as possible for (each street on screen): while (that street has room for a label): # (even if already labeled) put a label on that street # i.e. an additional one yours is: # Try to label unlabeled streets for (each street on screen) if (no label on screen for that street): # if unlabeled if (street has room for a label): # ...can we fix? put a label on that street # ...then fix (I would usually write this with an && rather than nested if's but I know mobile makes you scroll sideways) As a followup, could you please define "street has room for a label"? When do you consider that a street has room for a label?