myHealth = 50 visitedRooms = [] # ********************************* SET UP THE ROOMS ******************************************** # # Shop # # Room descriptions should include interactive containers like CABINET, CARDBOARD BOX, SHOEBOX, and LOCKED CONTAINER shop = Room("Shop","A dark crypt, skulls surround you and give you an eerie feeling. Growls echo along the walls, as you search for things. There is a CABINET above a dirty sink, A CARDBOARD BOX in the corner, and A SHOEBOX under the sink.") # The Shop has a CABINET object that contains/hides 2 interactive items: a fork and a health potion # Once this container is open, the interactive items will no longer be hidden in the container shop.cabinet = Container("cabinet above the sink",["a fork","health potion"]) # The Shop has a CARDBOARD BOX object that contains/hides 1 interactive item, a bitten cookie # Once this container is open, the interactive items will no longer be hidden in the container shop.cardboardbox = Container("a cardboard box in the corner",["cookie"]) # The Shop has a SHOEBOX object that contains/hides 2 interactive items: a kinfe and soap # Once this container is open, the interactive items will no longer be hidden in the container shop.shoebox = Container("shoebox under the sink",["a knife","soap"]) # Create an interactive item that's show in a room (not hidden in a container) with create_room_item() newPotion = HealthPotion(0,0) #Armory Room # armory = Room("Armory Room","A dark open room that has a stinky stench. A glimmer catches your eye and you find a PISTOL. you find some other weapons but they are all broken.") armory.create_room_item("gun") newGun = Gun("New","Pistol",0) #SupplyCloset #
# ********************************* SET UP THE ROOMS ********************************* # Shop (East Room) # # Room descriptions should include interactive containers like CABINET, CARDBOARD BOX, SHOEBOX, and LOCKED CONTAINER shop = Room( "Shop", "A dark crypt, skulls surround you and give you an eerie feeling. Growls echo along the walls, as you search for things. There is a CABINET above a dirty sink, A CARDBOARD BOX in the corner, A SHOEBOX under the sink, and a LOCKED CONTAINER in front of you." ) # The Shop has a CABINET object that contains/hides 2 interactive items: a fork and a health potion # Once this container is open, the interactive items will no longer be hidden in the container shop.cabinet = Container("cabinet above the sink", ["a fork", "health potion"]) # The Shop has a CARDBOARD BOX object that contains/hides 1 interactive item, a bitten cookie # Once this container is open, the interactive items will no longer be hidden in the container shop.cardboardbox = Container("a cardboard box in the corner", ["cookie"]) # The Shop has a SHOEBOX object that contains/hides 2 interactive items: a kinfe and soap # Once this container is open, the interactive items will no longer be hidden in the container shop.shoebox = Container("shoebox under the sink", ["a knife", "soap"]) # The Shop has a LOCKED CONTAINER object that contains/hides 1 interactive item, a # Once this container is open, the interactive items will no longer be hidden in the container shop.cardboardbox = Container("a locked container in front of you", ["slingshot"]) # Create an interactive item that's show in a room (not hidden in a container) with create_room_item() shop.create_room_item("rat") # Small Office # smalloffice = Room( "Small Office",