Project TWO
Project TWO
# The Dictionary for the rooms and its link to other room
# Dictionary for the Zombie Apocalypse Game
rooms = {
'Lounge': {'South': 'Kitchen', 'North': 'Gameroom', 'West': 'Hallway'},
'Bedroom': {'South': 'Living Room', 'West': 'Gameroom'},
'Study Room': {'North': 'Living Room', 'South': 'Dining Room'},
'Hallway': {'East': 'Lounge'},
'Gameroom': {'South': 'Lounge', 'East': 'Bedroom'},
'Living Room': {'North': 'Bedroom', 'South': 'Study Room'},
'Dining Room': {'North': 'Study Room', 'West': 'Kitchen'},
'Kitchen': {'North': 'Lounge','East': 'Dining Room'},
}
# The Game Loop
current_room = 'Hallway'
player_move = ''
print ('You are in the', current_room, '\n')
while current_room != 'Exit':
player_move = input('Enter your move: \n')
if player_move in ["Exit", "exit"]:
current_room = 'Exit'
print ('Play again soon!')
break
if player_move == 'east' or 'East':
current_room = 'Lounge'
print ('You are in the', current_room + '.', '\n')
print ('You see a sword.')
player_move = input('Enter your move:\n')