def display_answer(self):
     for x in range(self.level):
         utils.blit_offset(
             'entries/' + str(self.num[x]),
             g.ATTEMPT, (x, self.lives + 2), 1)
         utils.blit_offset('status/bull', g.ATTEMPT,
                           (x + 0.5 + self.level, self.lives + 2), 1)
 def attempt_disp(self):
     for num in range(len(self.attempts_list)):
         for x in range(self.level):
             utils.blit_offset('status/' + self.compare_list[num][x],
                               g.ATTEMPT, (self.level + .5 + x, num + 1), 1)
             utils.blit_offset(
                 'entries/' + str(self.attempts_list[num][x]), g.ATTEMPT,
                 (x, num + 1.1), 1)
    def highlight(self):
        pos = int((g.pos[0] - g.DIALPAD[0]) /
                  g.XGAP), int((g.pos[1] - g.DIALPAD[1]) / g.XGAP)

        if pos[0] in range(3) and pos[1] in range(4):
            num = 3 * pos[1] + pos[0] + 1
            utils.blit_offset('dialpad/highlight', g.DIALPAD, pos)
            utils.blit_offset('dialpad/' + str(num), g.DIALPAD, pos)
    def display(self):
        g.screen.fill(g.BG_COLOR)
        for x in range(3):
            for y in range(4):
                utils.blit_offset('dialpad/no-glow',
                                  g.DIALPAD, (x, y))
                utils.blit_offset('dialpad/' + str(1 + x + 3 * y),
                                  g.DIALPAD, (x, y))
        for x in range(int(self.level)):
            utils.blit_offset('entries/entry-small',
                              (g.ATTEMPT[0], g.ATTEMPT[1] + g.DISP_SIZE),
                              (x, 0), 1)
            utils.blit_offset('status/bull', g.ATTEMPT,
                              (self.level + .5 + x, 0), 1)
            utils.blit_offset('entries/question', g.ATTEMPT, (x, 0), 1)
            utils.blit_offset('dialpad/entry-big', g.DIALPAD,
                              (x + self.offset, -0.7))

        for x in range(len(self.input)):
            utils.blit_offset('dialpad/no-glow', g.DIALPAD,
                              (self.offset + x, -1.6))
            utils.blit_offset('dialpad/' + str(self.input[x]), g.DIALPAD,
                              (self.offset + x, -1.6))

        utils.blit_offset('lives/lives', g.DIALPAD, (0, 4.5))
        utils.blit_offset('lives/' + str(self.lives -
                          len(self.attempts_list)), g.DIALPAD, (1, 4.5))
        self.highlight()
        self.result()
        self.attempt_disp()
        if self.status == 'lost':
            self.display_answer()