Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nesting complexity in Data Structures.
{"pages": [ {"playerName": "Boris",
"livesLeft": 1},
{"playerName": "Anna",
"livesLeft": 1} ],
"items": ["broadsword", "healingPotion", "mirrorShield"]
"timestamp": 12593829349045 }
@briandk
Copy link
Author

briandk commented Apr 1, 2014

The actual data structures we work with are even more complex than that:

{
    "_id": "532c8e3a00a4ac2da9000374",
    "ada_base_types": [
        "MakeComponentBaseEvent",
        "MakeBaseEvent",
        "ADAGEGameEvent",
        "ADAGEEventData",
        "ADAGEData"
    ],
    "adage_version": "electric_eel",
    "application_name": "makescape",
    "application_version": "development_aa819b89c308baf202e2f14523596f56",
    "component_list": [
        {
            "marker_id": 10,
            "type": "BATTERY",
            "positive_terminal": 18,
            "negative_terminal": -1,
            "current_flowing": true,
            "x": 0,
            "y": 0,
            "theta": 0
        },
        {
            "marker_id": 18,
            "type": "RESISTOR",
            "positive_terminal": 27,
            "negative_terminal": -1,
            "current_flowing": true,
            "x": 0,
            "y": 0,
            "theta": 0
        }
    ],
    "created_at": "2014-03-21T19:08:42Z",
    "game": null,
    "game_id": null,
    "key": "MakeConnectComponent",
    "player_names": null,
    "playspace_ids": [
        2
    ],
    "session_token": "2a0af57ee47c881b59b0de016a8a3b443381c7ef:2014-03-21_133705",
    "timestamp": "1395428911073",
    "updated_at": "2014-03-21T19:08:42Z",
    "user_id": 1406,
    "virtual_context": null
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment