Exemple #1
0
from container import Container

heldItems = []
myHealth = 95
visitedRooms = []

# ********************************* SET UP THE ROOMS *********************************

# Kitchen
#
# Room descriptions should include interactive containers like CABINET, BIN, DESK, SHELF, SHOEBOX that contain/hide other interactive items
Gym = Room("Gym","A big, empty, dark room with a bunch of boxes everywhere. On the floor there is a KNIFE and a FIRST AID")

# The kitchen has a CUPBOARD object that contains/hides 3 interactive items, a sponge, a plate, a can of soup
# Once this container is open, the interactive items will no longer be hidden in the container
Gym.box = Container("box right next to you",["basketball","shoe","tennis ball"])
# The kitchen has a CABINET object that contains/hides 2 interactive items, a knife and a twinkie
# Once this container is open, the interactive items will no longer be hidden in the container
Gym.box2 = Container("a closed, shiny box near the gym door",["Diary of A Wimpy Kid book","baseball helmet"])

# Create an interactive item that's show in a room (not hidden in a container) with create_room_item()
Gym.create_room_item("knife")
Gym.create_room_item("first aid")

# Small Office
#
smalloffice = Room("Small Office","A dark room with a mess of books and papers covering the desk. There is some mail and an ozon.ru PACKAGE. You can READ a book. You can look in the DESK.")
smalloffice.desk = Container("desk",["battery","envelope"])
smalloffice.package = Container("ozon.ru package",["sheet of bubble wrap","porcelain figurine of a bear","red flashlight"])
smalloffice.create_room_item("guinea pig")
redFlashlight = Flashlight("red",0,False)
Exemple #2
0
myHealth = 95
visitedRooms = []

# ********************************* SET UP THE ROOMS *********************************

# Kitchen
#
# Room descriptions should include interactive containers like CABINET, BIN, DESK, SHELF, SHOEBOX that contain/hide other interactive items
Gym = Room(
    "Gym",
    "A big, empty, dark room with a bunch of boxes everywhere. On the floor there is a KNIFE and a FIRST AID"
)

# The kitchen has a CUPBOARD object that contains/hides 3 interactive items, a sponge, a plate, a can of soup
# Once this container is open, the interactive items will no longer be hidden in the container
Gym.box = Container("box right next to you",
                    ["basketball", "shoe", "tennis ball"])
# The kitchen has a CABINET object that contains/hides 2 interactive items, a knife and a twinkie
# Once this container is open, the interactive items will no longer be hidden in the container
Gym.box2 = Container("a closed, shiny box near the gym door",
                     ["diary of a wimpy kid book", "baseball helmet"])

# Create an interactive item that's show in a room (not hidden in a container) with create_room_item()
Gym.create_room_item("knife")
Gym.create_room_item("first aid")

# Classroom
#
classroom = Room(
    "Classroom",
    "A dark room with rows of desks and posters on the walls. There are items on some of the desks and a BOX in the corner of the room. You can READ a poster. You can Take at the items on the DESKS. There is a red flashlight near the door."
)
Exemple #3
0
library.drawer = Container("Drawer",["baseball bat","Book"])
# Create an interactive item that's show in a room (not hidden in a container) with create_room_item()
book = Book(True,"red")
library.create_room_item("empty purse")




# Waitting Room 
#
# Room descriptions should include interactive containers like CABINET, BIN, DESK, SHELF, SHOEBOX that contain/hide other interactive items
waittingroom  = Room("waitting room","A dark and dirty room with flies buzzing around. There are chairs, old dusty lamps, and tables inthe middle of the room. There is are BOXES laying around and PAPERS piled all over the place.")

# The waitting room has a BOX object that contains/hides 3 interactive items, a key to the geroge,
# Once this container is open, the interactive items will no longer be hidden in the container
waittingroom.box = Container("Box under a chair",["key to garage"])
# The waitting Room has stcks of papers object that contains/hides 2 interactive items
# Once this papers are removed, the interactive items will no longer be hidden in the container
waittingroom.papers = Container("papers piled everywhere",["item 1","item 2"])
waittingroom.container = Container("garage", ["GARAGE"],"in")


# Create an interactive item that's show in a room (not hidden in a container) with create_room_item()
waittingroom.create_room_item("spoon")
waittingroom.create_room_item("rat")