Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/conozcouy.py
diff options
context:
space:
mode:
Diffstat (limited to 'conozcouy.py')
-rwxr-xr-xconozcouy.py24
1 files changed, 10 insertions, 14 deletions
diff --git a/conozcouy.py b/conozcouy.py
index e528759..bd3534c 100755
--- a/conozcouy.py
+++ b/conozcouy.py
@@ -266,9 +266,10 @@ class ConozcoUy():
unicode(valor.strip(),'iso-8859-1'))
elif var.startswith("Pregunta"):
[texto,respuesta,ayuda] = valor.split("|")
+ listaRespuestas = unicode(respuesta.strip(),'iso-8859-1').split(",")
nuevoNivel.preguntas.append(
(unicode(texto.strip(),'iso-8859-1'),
- unicode(respuesta.strip(),'iso-8859-1'),
+ listaRespuestas,
unicode(ayuda.strip(),'iso-8859-1')))
linea = f.readline()
f.close()
@@ -774,20 +775,15 @@ class ConozcoUy():
"""Devuelve True si las coordenadas cliqueadas corresponden a la
respuesta correcta
"""
- respCorrecta = nivel.preguntaActual[1]
- encontrado = False
+ listaRespCorrecta = nivel.preguntaActual[1]
for d in self.listaZonas:
- if d.nombre == respCorrecta:
- encontrado = True
- break
- if d.estaAca(pos):
- d.mostrarNombre(self.pantalla,
- self.fuente32,
- COLORNOMBRE,
- True)
- return True
- else:
- return False
+ if d.nombre in listaRespCorrecta and d.estaAca(pos):
+ d.mostrarNombre(self.pantalla,
+ self.fuente32,
+ COLORNOMBRE,
+ True)
+ return True
+ return False
def jugarNivel(self):
"""Juego principal de preguntas y respuestas"""