# Dungeon Game Prototype

#1

The idea came from the Battleship Lesson.
If you have any thoughts, nitpicks, or comments, feel free to leave them.

room = []

for x in range(0, 5):
room.append(["#"] * 5)

def print_room(room):
for row in room:
print " ".join(row)

room[1][3] = βWβ

motion = False

def rebound(yco, xco):
global ycoord
global xcoord
if user_input == βwβ:
yco += 1
ycoord += 1
room[yco][xco] = βGβ
print_room(room)
elif user_input == βsβ:
yco -= 1
ycoord -= 1
room[yco][xco] = βGβ
print_room(room)
elif user_input == βaβ:
xco += 1
xcoord += 1
room[yco][xco] = βGβ
print_room(room)
elif user_input == βdβ:
xco -= 1
xcoord -= 1
room[yco][xco] = βGβ
print_room(room)

ycoord = 2
xcoord = 2
room[xcoord][ycoord] = βGβ

print_room(room)

def testspot(yco, xco):
if room[yco][xco] == β#β:
room[yco][xco] = βGβ
print_room(room)
else:
print βWALL BOIβ
global user_input
global xcoord
global ycoord
rebound(yco, xco)

running = 0
death = False
def turn(run):
global running
running += 1
global user_input
user_input = raw_input("Enter: ")

def move(direction):
global ycoord
global xcoord
global motion
motion = True
if direction == βwβ:
if ycoord == 0:
print βThere is no door there.β
print_room(room)
else:
room[ycoord][xcoord] = β#β
ycoord -= 1
testspot(ycoord, xcoord)
elif direction == βsβ:
if ycoord == 4:
print βThere is no door there.β
print_room(room)
else:
room[ycoord][xcoord] = β#β
ycoord += 1
testspot(ycoord, xcoord)
elif direction == βaβ:
if xcoord == 0:
print βThere is no door there.β
print_room(room)
else:
room[ycoord][xcoord] = β#β
xcoord -= 1
testspot(ycoord, xcoord)
elif direction == βdβ:
if xcoord == 4:
print βThere is no door there.β
print_room(room)
else:
room[ycoord][xcoord] = β#β
xcoord += 1
testspot(ycoord, xcoord)
else:
print βlol wutβ

while running >= 0 and death == False:
turn(8)
print running
global user_input
if user_input == βendβ:
break