I need to have the player chose which direction to go and I'm stuck with what code
Question:
I need to have the player chose which direction to go and I'm stuck with what code to use. AND
How do I code to pick up inventory?
This is part of the IT-140 Intro to Scripting. Code is Python, Module 7 Project Two, SNHU#print a main menue and the commands
print('Pink Chicken Cupcakes\n**********Welcome to work**********\nYou have received your order for today.\nPlease purchase all items without running into a Bomb-Cyclone, and you will win the game.')
print('Move commands: go North, go South, go East, go West')
print("Add to Purchase: get 'item name'")
#create dictionary
rooms = {
'Pink Chicken Cupcakes, HQ': {'East': 'Amazon.com'},
'Amazon.com': {'South': 'Hobby Lobby', 'West': 'Pink Chicken Cupcakes, HQ', 'item': 'Wrappers and Liners'},
'Hobby Lobby': {'South': 'Cake Crafts', 'East': 'Bomb-Cyclone', 'North': 'Amazon.com', 'item': 'Packaging'},
'Cake Crafts': {'South': 'Evil Cake Genius', 'West': 'Bomb-Cyclone', 'North': 'Hobby Lobby','item': 'Fondant and Modeling Chocolate'},
'Evil Cake Genius': {'West': 'PCC Kitchen', 'North': 'Cake Crafts', 'items': 'Icing Sheets'}
}
def status():
print("\nYou're in {}".format(current_room)) # player is in which room
print('Inventory', 'inventory')
item_pickup()
def item_pickup():
if 'item' in rooms[current_room] and (rooms[current_room]['items']) not in inventory:
print('If you see the', rooms[current_room]["please purchase it!"])
current_room = 'Pink Chicken Cupcakes, HQ'
directions = ['north', 'south', 'east', 'west']
items = ['wrappers and liners', 'packaging', 'fondant and modeling chocolate', 'icing sheets']
while True:
print("\nYou're in {}".format(current_room))
print('Which direction do you want to go?')
if rooms == 'Bomb-Cyclone':
print('Weather, you lose', end='')
for i in range(50):
for i in range(10000000):
pass
print(".")
# print()
if 4 != len(items):
print('You won')
else:
direction = input("Enter 'North', 'South', 'East', 'West', 'Bomb-Cyclone':")
#****************************Code Good to this point******************************************#
HERE's MY CODE