Exemplo n.º 1
0
    def __init__(self):

        bed = Bed()
        lamp = UnreachableLamp()
        dresser = Dresser()
        chair = Chair()
        Bedroom = Room(name='Bedroom',
                       objects=[bed, lamp, dresser],
                       description='A homey room with blue wallpaper \
            and old-fashioned scenes hanging from brass frames.  There is a large four-poster against one wall \
            and a small dresser in the corner.',
                       exits={})
        Closet = Room(name='Closet',
                      objects=[chair],
                      description='Significantly colder than the bedroom, \
            the closet has a slanted roof that only makes it feel more cramped',
                      exits={})
        Bedroom.exits['west'] = Closet
        Closet.exits['east'] = Bedroom

        self.all_objs = [bed, lamp, dresser, chair]
        self.game = {
            'rooms': [Bedroom, Closet],
            'inv': [],
            'location': Bedroom
        }
 def setUp(self):
     self.dresser = Dresser()
     self.bed = Bed()
     self.lamp = Lamp()
     self.chair = Chair()
     self.ulamp = UnreachableLamp()
     self.room = Room(name="Room",
                      objects=[self.dresser, self.bed, self.ulamp],
                      description='',
                      exits={})
     self.southern_room = Room(name='Southern Room',
                               objects=[self.chair],
                               description='',
                               exits={'north': self.room})
     self.room.exits['south'] = self.southern_room
     self.inv = []
Exemplo n.º 3
0
 def setUp(self):
     self.dresser = Dresser()
     self.bed = Bed()
     self.lamp = Lamp()
     self.unreachable_lamp = UnreachableLamp()
     self.chair = Chair()