La descarga está en progreso. Por favor, espere

La descarga está en progreso. Por favor, espere

JUEGO: Familia en Cascada.  ¿Cuáles son las salidas?

Presentaciones similares


Presentación del tema: "JUEGO: Familia en Cascada.  ¿Cuáles son las salidas?"— Transcripción de la presentación:

1 JUEGO: Familia en Cascada

2

3

4  ¿Cuáles son las salidas?

5  ¿Cuáles son las entradas?

6  ¿Cuáles son las condiciones o restricciones?

7  ¿Cuáles son los procesos o cálculos realizados?

8

9 def entero(text ) ok = False texto = raw_input(text) while not ok : texto = raw_input(text) ok = False try: texto = int(texto) ok = True if (texto 3) ok = False print "el numero no corresponde a alguna opción del menú, escoja una opción del 1 al 3" except: print "[",texto,"] no es un numero, o no es numero entero" return texto

10 def enterop(text): ok = False while not ok : texto = raw_input(text) ok = False try: texto = int(texto) ok = True if (texto 5) or (not VerificarPosicion(texto)): ok = False print "el numero no corresponde a algun jugador, ingrese un numero entre uno y cinco" except: print "[",texto,"] no es un numero, o no es numero entero" return texto

11 def VerificarPosicion(x): if x==0: return True if(lampara): if(LD[x-1]==1): return True else: if(LI[x-1]==1): return True return False

12 def prsonasnLD(): return LD def prsonasnLI(): return LI

13 def RestarT (x,y): global tiempo if y==-1: tiempo = tiempo - ContT[x] return if x==-1: tiempo= tiempo - ContT[y] return if ContT[x]>ContT[y]: tiempo= tiempo-ContT[x] else: tiempo= tiempo-ContT[y]

14 def Mov(x): global LD global LI if lampara== True: LD[x]=0 LI[x]=1 else: LD[x]=1 LI[x]=0

15 def CambiarLampara(): global lampara if lampara: lampara=False else: lampara=True

16 def WIN(): print '\n' print "Buen trabajo, has logrado lo que muchos no ;) " def LOOSER(): print '\n' print "UUUPS....! lo siento te has quedado sin tiempo.. :( "

17 def Todos(): for i in range(0,5): if(LD[i]==1): return False return True

18 def nuevojuego() global tiempo,lampara, LD, LI, ConT tiempo = 30 lampara = True LD = [1,1,1,1,1] LI = [0,0,0,0,0] ContT = [1,3,6,8,12]

19  Link para wiki: http://programacion-quimica1.wikispaces.com/home  Link para video: http://www.youtube.com/watch?v=vP0IrQUgFmA&feature=youtu.be  INTEGRANTES: ALEJANDRA PAOLA VELASQUEZ BARILLAS vel12141 EMMA VERONICA ABAC SUCHI aba12383 VENUS ESMERALDACEBALLOS URRUELA ceb12088


Descargar ppt "JUEGO: Familia en Cascada.  ¿Cuáles son las salidas?"

Presentaciones similares


Anuncios Google