def victory(self, yesNo): if (self.achievementsLimit > 0 and yesNo): self.achievementsLimit -= 1 print 'Display ACHIEVEMENT coupon!' if (API_CONTROL == 'web'): displayEngine.displayWebCoupon('Victory!', path + 'coupons/gamestop-coupon.jpeg') else: displayEngine.displayLocalCoupon('Victory!', path + 'coupons/gamestop-coupon.jpeg')
def closeCall(self, pacmanState, allGhostStates): if (self.isBufferOver() and self.closeCallsLimit > 0 and self.isCloseCall(pacmanState, allGhostStates)): self.lastCallTime = datetime.now() self.closeCallsLimit -= 1 print 'Display CLOSE CALL coupon!' if (API_CONTROL == 'web'): displayEngine.displayWebCoupon('Close Call!', path + 'coupons/popchips-coupon.jpg') else: displayEngine.displayLocalCoupon('Close Call!', path + 'coupons/popchips-coupon.jpg')
def special(self, isInSpecialState, message='Special'): if (self.isBufferOver() and self.specialsLimit > 0 and isInSpecialState): self.lastCallTime = datetime.now() self.specialsLimit -= 1 print 'Display SPECIAL coupon!' if (API_CONTROL == 'web'): displayEngine.displayWebCoupon(message, path + 'coupons/redbull-coupon.jpg') else: displayEngine.displayLocalCoupon(message, path + 'coupons/redbull-coupon.jpg')
def highScore(self, currentScore, targetScore): if (self.isBufferOver() and self.highScoresLimit > 0 and currentScore >= targetScore): self.lastCallTime = datetime.now() self.highScoresLimit -= 1 print 'Display NEW HIGH SCORE coupon!' if (API_CONTROL == 'web'): displayEngine.displayWebCoupon('New High Score!', path + 'coupons/coke-coupon.png') else: displayEngine.displayLocalCoupon('New High Score!', path + 'coupons/coke-coupon.png')
def victory(self, yesNo): if (self.achievementsLimit > 0 and yesNo): self.achievementsLimit -= 1 print 'Display ACHIEVEMENT coupon!' if (API_CONTROL == 'web'): displayEngine.displayWebCoupon( 'Victory!', path + 'coupons/gamestop-coupon.jpeg') else: displayEngine.displayLocalCoupon( 'Victory!', path + 'coupons/gamestop-coupon.jpeg')
def closeCall(self, pacmanState, allGhostStates): if (self.isBufferOver() and self.closeCallsLimit > 0 and self.isCloseCall(pacmanState, allGhostStates)): self.lastCallTime = datetime.now() self.closeCallsLimit -= 1 print 'Display CLOSE CALL coupon!' if (API_CONTROL == 'web'): displayEngine.displayWebCoupon( 'Close Call!', path + 'coupons/popchips-coupon.jpg') else: displayEngine.displayLocalCoupon( 'Close Call!', path + 'coupons/popchips-coupon.jpg')
def special(self, isInSpecialState, message='Special'): if (self.isBufferOver() and self.specialsLimit > 0 and isInSpecialState): self.lastCallTime = datetime.now() self.specialsLimit -= 1 print 'Display SPECIAL coupon!' if (API_CONTROL == 'web'): displayEngine.displayWebCoupon( message, path + 'coupons/redbull-coupon.jpg') else: displayEngine.displayLocalCoupon( message, path + 'coupons/redbull-coupon.jpg')
def highScore(self, currentScore, targetScore): if (self.isBufferOver() and self.highScoresLimit > 0 and currentScore >= targetScore): self.lastCallTime = datetime.now() self.highScoresLimit -= 1 print 'Display NEW HIGH SCORE coupon!' if (API_CONTROL == 'web'): displayEngine.displayWebCoupon( 'New High Score!', path + 'coupons/coke-coupon.png') else: displayEngine.displayLocalCoupon( 'New High Score!', path + 'coupons/coke-coupon.png')