Esempio n. 1
0
from chainsaw import Chainsaw

heldItems = []
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)
myHealth = 53
visitedRooms = []

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

# Kitchen
#
# Room descriptions should include interactive containers like CABINET, BIN, DESK, SHELF, SHOEBOX that contain/hide other interactive items
kitchen = Room("Kitchen","A dark and dirty room with flies buzzing around. There are dirty beakers, graduated cylinders, and pipettes in the sink. There is a CUPBOARD above the sink and a CABINET under the sink.")

# 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
kitchen.cupboard = Container("cupboard above the sink",["sponge","plate","can of "+u'\u0411\u043E\u0440\u0449'+" soup"])
# 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
kitchen.cabinet = Container("cabinet under the sink",["knife","twinkie"])

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

# Library
#
library=Room("Library","It's a mysterious place very dark and very quiet. You see a DESK as well as a SHELF.")

#Library has a DESK that contains/hides 2 items, a key, and a quarter
library.desk=Container("inside the desk.",["key","quarter"])
library.shelf=Container("on the shelf.",["Sniper","can"])
                                                

library.create_room_item("rat")
# Kitchen
#
# Room descriptions should include interactive containers like CABINET, BIN, DESK, SHELF, SHOEBOX that contain/hide other interactive items
kitchen = Room(
    "Kitchen",
    "A dark and dirty room with flies buzzing around. There are dirty beakers, graduated cylinders, and pipettes in the sink. There is a CUPBOARD above the sink and a CABINET under the sink."
)

# 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
kitchen.cupboard = Container("cupboard above the sink",
                             ["sponge", "plate", "can of bOPW soup"])
# 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
kitchen.cabinet = Container("cabinet under the sink", ["knife", "twinkie"])

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

#Bathroom
bathroom = Room(
    "Bathroom",
    "An old bathroom that had been trashed a long time ago and it looks like nobody had been in there for a long time. There is a shelf and a cabinet next to the shelf."
)
bathroom.shelf = Container("shelf", ["rat", "empty bag of food"])
bathroom.cabinet = Container("cabinet", ["dead Spider", "ammo"])

bathroom = Room(
    "Bathroom",
Esempio n. 4
0
    "A huge room that has very little lighting. You can hear the echos of mice running, and the support beams creaking. There is a CHEST behind stage that looks like it would have some clothing in it."
)
# The lab has a SHELF object that contains 3 interactive items. Shelf gets a third argument because you'd say ON the shelf, not IN the shelf
aud.chest = Container(
    "In the chest you see a ROBIN HOOD COSTUME, a BOW, and some ARROWS.",
    ["robinhood costume", "long bow", "quiver with arrows"], "in ")
aud.create_room_item("Cars Flashlight")
carsFlashlight = Flashlight("Cars", 1, True)

# Janitor Closet
#
janitorcloset = Room(
    "Janitor Closet",
    "A small dark room with a musty smell. On one side is a filing CABINET and a large plastic BIN. On the other side is a SHELF with supplies and a SHOEBOX."
)
janitorcloset.cabinet = Container("cabinet", ["holy water", "bible"])
janitorcloset.shelf = Container("shelf", ["shank"])
# Create a fake room called locked that represents all permenently locked doors
#
locked = Room("locked", "")

# Connect rooms. These are one-way connections.

Gym.link_room(locked, "EAST")
Gym.link_room(classroom, "SOUTH")
Gym.link_room(locked, "WEST")
janitorcloset.link_room(classroom, "EAST")
classroom.link_room(Gym, "NORTH")
classroom.link_room(aud, "EAST")
classroom.link_room(locked, "SOUTH")
classroom.link_room(janitorcloset, "WEST")
# Kitchen
#
# Room descriptions should include interactive containers like CABINET, BIN, DESK, SHELF, SHOEBOX that contain/hide other interactive items
kitchen = Room(
    "Kitchen",
    "A dark and dirty room with flies buzzing around. There are dirty beakers, graduated cylinders, and pipettes in the sink. There is a CUPBOARD above the sink and a CABINET under the sink."
)

# 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
kitchen.cupboard = Container("cupboard above the sink",
                             ["sponge", "plate", "can of BOPW soup"])
# 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
kitchen.cabinet = Container("cabinet under the sink", ["knife", "twinkie"])

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

# 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"])
Esempio n. 6
0
myHealth = 53
visitedRooms = []

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

# Kitchen
#
# Room descriptions should include interactive containers like CABINET, BIN, DESK, SHELF, SHOEBOX that contain/hide other interactive items
kitchen = Room("Kitchen","A dark and dirty room with flies buzzing around. There are dirty beakers, graduated cylinders, and pipettes in the sink. There is a CUPBOARD above the sink and a CABINET under the sink.")

# 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
kitchen.cupboard = Container("cupboard above the sink",["sponge","plate","can of "+u'\u0411\u043E\u0440\u0449'+" soup"])
# 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
kitchen.cabinet = Container("cabinet under the sink",["knife","twinkie"])

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

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

# Laboratory
#
Esempio n. 7
0
# ********************************* SET UP THE ROOMS *********************************



# Kitchen
#
# Room descriptions should include interactive containers like CABINET, BIN, DESK, SHELF, SHOEBOX that contain/hide other interactive items
kitchen = Room("Kitchen","A dark and dirty room with flies buzzing around. There are dirty beakers, graduated cylinders, and pipettes in the sink. There is a CUPBOARD above the sink and a CABINET under the sink.")

# 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
kitchen.cupboard = Container("cupboard above the sink",["sponge","plate","can of bOPW soup"])
# 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
kitchen.cabinet = Container("cabinet under the sink",["knife","twinkie"])
# Create an interactive item that's show in a room (not hidden in a container) with create_room_item()
kitchen.create_room_item("spoon")
kitchen.create_room_item("rat")


# Bathroom
#
# Room descriptions should include interactive containers like CABINET that contain/hide other interactive items
bathroom = Room("Bathroom","A squeaky clean room. There are Sinks , Showers , and Tolites.")

# The bathroom has a CABINET object that contains/hides 1 interactive item, a razor
# Once this container is open, the interactive items will no longer be hidden in the container
bathroom.cabinet = Container("cabinet above the sink",["a razor"])
# Create an interactive item that's show in a room (not hidden in a container) with create_room_item()
bathroom.create_room_item("rat")