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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
import pygame, jmenu, impares, pares, olpcgames, logging, finishGame, sys, about, help, highScores
from impares import *
from pares import *
from constants import *
from finishGame import *
from about import *
from help import *
from highScores import *
from constants import *
from gettext import gettext as _
LOG_FILENAME='Esquiador.log'
log = logging.getLogger( 'EsquiadorRun' )
#log.setLevel( logging.DEBUG )
highScore = HighScore()
screen = pygame.display.set_mode(screen_size)
bg = imagenFondo;
pygame.display.flip()
color = (0,0,0)
font = './fonts/ice_sticks.ttf'
just = True
pos = ('center','center')
def estadoJugador(self, estado):
self.jugador=estado
while pygame.event.poll().type != pygame.QUIT:
screen.blit(bg, (0,0) )
selection = jmenu.run([
_('Numeros pares'),
_('Numeros impares'),
_('Puntajes mas altos') ,
_('Ayuda'),
_('Acerca de'),
_('Salir')],
color,42,font=font,light=10,justify=just,pos=pos)
if selection == _('Numeros pares'):
just = True
pos = ('center','center')
color = (0,0,0)
font = font
try:
pares.mainPares()
except IndexError:
print 'Termino el juego de pares!!!'
finishGame.finishing()
elif selection == _('Numeros impares'):
just = True
pos = ('center','center')
color = (0,0,0)
font = font
try:
impares.mainImpares()
except IndexError:
print 'Termino el juego de impares!!!'
finishGame.finishing()
elif selection == _('Puntajes mas altos'):
just = True
pos = ('center','center')
color = (0,0,0)
font = font
highScore.mainHighScores()
elif selection == _('Ayuda'):
just = True
pos = ('center','center')
color = (0,0,0)
font = font
help.mainHelp()
elif selection == _('Acerca de'):
just = True
pos = ('center','center')
color = (0,0,0)
font = font
about.mainAbout()
elif selection == _('Salir') :
sys.exit(0)
#break
|