intficpy/room.py
def resolveDarkness(self, game):
        """
        Determine if the player can see, based on this Room's `dark` attribute, and
        whether there is a lit LightSource present

        :param game: the current game
        :type game: IFPGame
        """
        can_see = True
        if self.dark:
            lightsource = None
            for key in self.contains:
                for item in self.contains[key]:
                    if isinstance(item, LightSource):
                        if item.is_lit:
                            lightsource = item
                            break
            for key in game.me.contains:
                for item in game.me.contains[key]:
                    if isinstance(item, LightSource):
                        if item.is_lit:
                            lightsource = item
                            break
            if not lightsource:
                can_see = False
        return can_see

        Determine if the player can see, based on this Room's `dark` attribute, and
        whether there is a lit LightSource present

        :param game: the current game
        :type game: IFPGame
        
Determine if the player can see, based on this Room's `dark` attribute, and
whether there is a lit LightSource present
Determine if the player can see based on this Room ' s ` dark ` attribute and whether there is a lit LightSource present
def resolveDarkness(self, game):
        can_see = True
        if self.dark:
            lightsource = None
            for key in self.contains:
                for item in self.contains[key]:
                    if isinstance(item, LightSource):
                        if item.is_lit:
                            lightsource = item
                            break
            for key in game.me.contains:
                for item in game.me.contains[key]:
                    if isinstance(item, LightSource):
                        if item.is_lit:
                            lightsource = item
                            break
            if not lightsource:
                can_see = False
        return can_see
def resolveDarkness ( self , game ) : can_see = True if self . dark : lightsource = None for key in self . contains : for item in self . contains [ key ] : if isinstance ( item , LightSource ) : if item . is_lit : lightsource = item break for key in game . me . contains : for item in game . me . contains [ key ] : if isinstance ( item , LightSource ) : if item . is_lit : lightsource = item break if not lightsource : can_see = False return can_see
Determine if the player can see, based on this Room's `dark` attribute, and
whether there is a lit LightSource present
Determine if the player can see based on this Room ' s ` dark ` attribute and whether there is a lit LightSource present
"""
        Determine if the player can see, based on this Room's `dark` attribute, and
        whether there is a lit LightSource present

        :param game: the current game
        :type game: IFPGame
        """
self
game
the current game
the current game