-
Notifications
You must be signed in to change notification settings - Fork 3
Maze Level Format
blickly edited this page Sep 12, 2011
·
9 revisions
We need to decide the format of our mazes to be saved by the webapp and loaded on the handset. Important considerations are what formats are easy to use on Android, and which formats will be easy to extend with new features.
- ...
- ...
Json format: [{ "id" : , "user-added" : , "lat" : , "lng" : , "neighbors" : []}+] }]
For a graph, all we need are nodes and edges. This XML format describes the following data structures in python:
class Node: def init(self, latlng): self.latlng = latlng
class Edge: """ s and e are both of type Node. """ def init(self, s, e): self.s = s self.e = e