diff --git a/game.py b/game.py index ee8cebd..b3834e6 100644 --- a/game.py +++ b/game.py @@ -204,12 +204,14 @@ class Game(gameUtils.Game): self.surf.blit(gameUtils.centre(self.currentCaptchaImg, self.size)) #draws the text to center of the screen #TODO: actually scale the text, however, more work needs to be done on the actual function of the game first + # Draw the captcha progerss if there is a captcha if self.currentCaptcha is not None: x1 = self.size[0] / 2 - self.currentCaptchaImg.size[0] / 2 y = self.size[1] / 2 + self.currentCaptchaImg.size[1] / 2 x2 = x1 + (self.currentCaptcha.charIdx / len(self.currentCaptcha.chars)) * self.currentCaptchaImg.size[0] pygame.draw.line(self.surf, (0, 255, 0), (x1, y), (x2, y), 5) + # Draw the timer if there's any time left timeLeft = self.timerLength - (time.perf_counter() - self.timerStart) if timeLeft > 0: normalisedTimeLeft = max(timeLeft / self.timerLength, 0)