Created
March 20, 2012 23:14
-
-
Save ctriolo/2142315 to your computer and use it in GitHub Desktop.
Settle Objects
This file contains hidden or 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
| Board = { | |
| 'hexes': [ {object Hex}, {object Hex}, ... ], | |
| 'intersections': [ {object Intersection}, {object Intersections}, ... ], | |
| 'edges': [ {object Intersection}, {object Intersection}, ... ], | |
| 'grid' [ | |
| [ index_of_hex, index_of_hex, ... ], // Maybe after board creation it would be good to get rid of this? | |
| [ index_of_hex, index_of_hex, ... ], | |
| [ index_of_hex, index_of_hex, ... ], | |
| ], | |
| 'gridWidth': 5, | |
| 'gridHeight': 5, | |
| } |
This file contains hidden or 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
| Edge = { | |
| 'index': 1, | |
| 'intersections': [3, 5] | |
| 'hexes': [7, 11, 13] | |
| 'token': {object Token} | |
| } |
This file contains hidden or 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
| Hex = { | |
| 'index': 5, | |
| 'grid': {'x': 2, 'y': 4} | |
| 'type': 'Wheat', | |
| 'number': 9, | |
| 'intersections': [3, 7, 11, 13, 17, 19] | |
| 'edges': [2, 4, 6, 7, 8, 9] | |
| } | |
This file contains hidden or 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
| Intersection = { | |
| 'index': 2, | |
| 'edges': [2, 4, 6] | |
| 'hexes': [3, 5, 7] | |
| 'token': {object Token} | |
| } |
This file contains hidden or 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
| Token = { | |
| player: ('WHITE'|'GREEN'|'RED'|'BLUE'|'N/A'), | |
| token: ('ROAD'|'SETTLEMENT'|'CITY'|'ROBBER'), | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment