Paste #11451: Untitled Paste

Date: 2014/11/22 11:32:57 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10


# This helper script returns the g value (cost from start) of a node.
g_score:
    type: procedure
    definitions: node
    script:
        - define node <def[node].unescaped>
        - narrate "node was <def[node]>"
        - define g_val <def[node].get[2]>
        - narrate "g_score was <def[g_val]>"
        - determine <def[g_val]>