Created
September 7, 2013 17:08
-
-
Save cnocon/6477320 to your computer and use it in GitHub Desktop.
Land Mass Array from Chris Pine's "Learning to Program" page 74
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
# These are just to make the map easier for me to read. # "M" is visually more dense than "o". | |
M = 'land' | |
o = 'water' | |
world = [[o,o,o,o,o,o,o,o,o,o,o], | |
[o,o,o,o,M,M,o,o,o,o,o], | |
[o,o,o,o,o,o,o,o,M,M,o], | |
[o,o,o,M,o,o,o,o,o,M,o], | |
[o,o,o,M,o,M,M,o,o,o,o], | |
[o,o,o,o,M,M,M,M,o,o,o], | |
[o,o,o,M,M,M,M,M,M,M,o], | |
[o,o,o,M,M,o,M,M,M,o,o], | |
[o,o,o,o,o,o,M,M,o,o,o], | |
[o,M,o,o,o,M,o,o,o,o,o], | |
[o,o,o,o,o,o,o,o,o,o,o]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment