Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/runEsquiadorFunc.py
blob: 9b98dd74803793dffc6d6730ead1be18c44407e0 (plain)
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
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 *

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