diff --git a/game.py b/game.py index 0e45b1a..2a9f4ed 100644 --- a/game.py +++ b/game.py @@ -203,6 +203,12 @@ class Game(gameUtils.Game): self.surf.fill((r * 255, 0, 0)) #sets the background colour 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 + + 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) if self.timerLength != 0: timeLeft = self.timerLength - (time.perf_counter() - self.timerStart)