Skip to content

Instantly share code, notes, and snippets.

@PeterPorty
PeterPorty / adventure.py
Created December 17, 2011 05:23 — forked from Aethaeryn/adventure.py
To help Pete learn Python.
# Turning Pete's program into a class.
class Adventure:
X = 0
Y = 1
maze = [[False, False, True, False, False],
[False, True, True, False, True],
[False, True, False, True, True],
[False, True, False, True, False],
[False, True, True, True, False]]
@PeterPorty
PeterPorty / adventure.py
Created December 17, 2011 05:03 — forked from Aethaeryn/adventure.py
To help Pete learn Python.
X = 0
Y = 1
def main():
location = [0, 0]
move(location,1,0)
print location
main()
def move(loc, x, y):
loc[X] += x