Created
August 24, 2012 05:30
-
-
Save RyanBreaker/3445869 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
towns = ['1', ['1.1', ['1.1.1', '1.1.2', '1.1.3'], '1.2', ['1.2.1', '1.2.2']], | |
'2', ['2.1', '2.2'], '3'] | |
""" | |
1 | |
|\ | |
| 1.1 | |
| | \ | |
| | 1.1.1 | |
| | | | |
| | 1.1.2 | |
| | | | |
| | 1.1.3 | |
| 1.2 | |
| \ | |
| 1.2.1 | |
| | | |
| 1.2.2 | |
2 | |
|\ | |
| 2.1 | |
| | | |
| 2.2 | |
3 | |
""" |
I've been thinking about it and I should be able to figure it out, but it might take a bit, depending on how long you'll wait before merging dev into master.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I love the map layout. It is powerful and flexible enough to handle any length name. Having loops such as 1.1.3 -> 1.2 will need a code change in placeZone(). This is possible, but will need some hard thinking and visualizing how the zones get placed. For example, how will placeZone() know when to create a path back to 1.2? Will it look at it's parents neighbors? That certainly could work, but the loops will be limited to just one level as shown here (1.1.3 could never connect to 2 for example).