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