0% found this document useful (0 votes)
13 views2 pages

Project TWO

Uploaded by

daxonic33
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Project TWO

Uploaded by

daxonic33
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

# Dax Patel

# 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')

if player_move == 'Get sword' or 'get sword':


print ('Sword collected!\n')
print ('Yor are in the', current_room)
print ('Inventory = [sword]')
player_move = input ('Enter your move:\n')

if player_move == 'north' or 'North':


current_room = 'Gameroom'
print ('You are in the', current_room + '.\n')
print ('You see Compass')
player_move = input ('Enter your move:\n')

if player_move == 'Get compass' or 'get compass':


print ('Compass collected!\n')
print ('You are in the', current_room)
else:
print('Invalid move.')
print ('Inventory = [sword, compass]')
player_move = input ('Enter your move:\n')

if player_move == 'east' or 'East':


current_room = 'Bedroom'
print ('You are in the', current_room + '.\n')
print ('You see Gun.')
player_move = input ('Enter your move:\n')

if player_move == 'Get gun' or 'get Gun' or 'get gun':


print ('Gun collected!\n')
print ('You are in the', current_room + '.')
print ('Inventory = [sword, compass, gun]')
player_move = input ('Enter your move:\n')

if player_move == 'South' or 'south':


current_room = 'Living Room'
print ('You are in the', current_room + '.\n')
print ('You see a Keys.')
player_move = input ('Enter your move:\n')

if player_move == 'Get Keys' or 'get Keys' or 'Get keys' or 'get keys':


print ('Keys collected!\n')
print ('You are in the', current_room + '.')
print ('Inventory = [sword, compass, gun, keys]')
player_move = input ('Enter your move:\n')

if player_move == 'South' or 'south':


current_room = 'Study room'
print ('You are in the', current_room + '.\n')
print ('You see a Map.')
player_move = input ('Enter your move:]\n')

if player_move == 'Get Map' or 'get Map' or 'get map' or 'Get map':


print ('Map collected!\n')
print ('You are in the', current_room + '.')
print ('Inventory = [sword, compass, gun, keys, map]')
player_move = input ('Enter your move:\n')

if player_move == 'South' or 'south':


current_room = 'Dining Room'
print ('You are in the', current_room + '.\n')
print ('You see a scent.')
player_move = input ('Enter your move:\n')

if player_move == 'get scent' or 'get Scent' or 'Get scent' or 'Get Scent':


print ('Scent collected!\n')
print ('You are in the', current_room, '.')
print ('Inventory = [sword, aromor, gun, keys, map, scent]')
player_move = input ('Enter your move:\n')

if player_move == 'west' or 'West':


current_room ='Kitchen'
print ('Well Done, You have reached the Kitchen. Your inventory list is
accompolished!')
print ('Oh NO, You see the Zombie:\n')
player_move = input ('Enter your move:\n')

if player_move == 'Use Item' or 'Use Items' or 'use item' or 'use items' or


'use Item' or 'use Items':
print ('Congratulations! You have WON the game by defeating the Zombie.')
else:
print ('Game over! you have accompolished by defeating the Zombie')
break

You might also like