1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import pygame,sys,impares,pares
import txtlib
from pygame.locals import *
from constants import *
from pares import *
from impares import *
def finishing(score,mod):
pygame.init()
screen = pygame.display.set_mode(screen_size)
m=""
if mod =="pares":
m = "pares"
else:
m = "impares"
text = txtlib.Text((screen_size[0]-200,screen_size[1]-200), 'freesans')
text.text = '''Actividad Esquiador terminada!
\nModalidad: \t'''+m+'''
\nPuntaje:\t'''+str(score)+'''
\nFelicitaciones ! ! ! ! !
\nEste juego permite diferenciar entre los diferentes tipos de numeros.
\nGracias por jugarlo, y buena suerte!
'''
text.add_style(0, 30, txtlib.FONT, './fonts/ice_sticks.ttf')
text.add_style(0, 30, txtlib.SIZE,(screen_size[0]*25)/800)
text.add_style(31, 82, txtlib.FONT, './fonts/ice_sticks.ttf')
text.add_style(31, 82, txtlib.SIZE,(screen_size[0]*25)/900)
text.add_style(90, 155, txtlib.ITALIC)
text.add_style(90, 155, txtlib.BOLD)
text.update()
screen.blit(text.area, (100, 100))
pygame.display.flip()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
exit(0)
if event.type == KEYDOWN:
if event.key == K_ESCAPE:
# Cierra el juego presionando escape
#exit(0)
#pygame.display.flip()
return
|