예제 #1
0
 def isGameOver(self):
     if self.isLearning:
         keys = Display.getKeys()
         if 'q' in keys: 
             self.userThread.quit = True
             return True
         return self.iteration > Const.TRAIN_ITERATIONS
     if self.userThread.quit:
         return True
     if self.userThread.victory:
         return True
     return self.userThread.hasCollided()
예제 #2
0
 def freezeFrame(self):
     while True:
         keys = Display.getKeys()
         if 'q' in keys: return
         Display.graphicsSleep(0.1)