コード例 #1
0
 def enter_room(self, inventory):
     light_sources = inventory.get(LightSource)
     if LightSource.is_one_on(light_sources):
         Room.enter_room(self, inventory)
     else:
         print ("You were eaten by a grue.")
         print ("Game over.")
         exit()
コード例 #2
0
 def enter_room(self, inventory):
     light_sources = inventory.get(LightSource)
     if LightSource.is_one_on(light_sources):
         Room.enter_room(self, inventory)
     else:
         print("You were killed by a Saitama")
         print("You died!!!")
         exit()