diff options
author | daedalus <daedalus2027@gmail.com> | 2009-08-31 02:16:53 (GMT) |
---|---|---|
committer | daedalus <daedalus2027@gmail.com> | 2009-08-31 02:16:53 (GMT) |
commit | 9345c09deed3a8a4b2c5233545df8b83eebde207 (patch) | |
tree | 506bcd125e408d4330c2080b175982859d441d05 | |
parent | 15bc7b04a3f11004cb4a69403262dacd81e56807 (diff) |
added some minor modifications
-rw-r--r-- | data/misc/lifegame | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/data/misc/lifegame b/data/misc/lifegame index 3b80584..77165df 100644 --- a/data/misc/lifegame +++ b/data/misc/lifegame @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Bibliotecas -import copy, os, time, random +import os, time, random def cargartablero(filas,columnas): tablero=[] @@ -75,7 +75,7 @@ def iteracion(tablero): else: tablero[x][y]=0 -def bucleprincipal(pulsos): +def bucleprincipal(filas,columnas,pulsos): pulso=0 tablero = cargartablero(30,30) while pulso < pulsos: @@ -85,5 +85,6 @@ def bucleprincipal(pulsos): dibujartablero(tablero) pulso = pulso + 1 time.sleep(0.2) -bucleprincipal(130) - +numero = input("Ingrese el numero de filas y columnas (unico numero):") +pulsos = input("Ingrese el numero de pulsos:") +bucleprincipal(numero,numero,pulsos) |