def run_curses(): sim = Simulador() print "DSADAS" interfaz = Interfaz.Interfaz() interfaz.build() resp = interfaz.menu() interfaz.show("simulando..." + resp) sim.run() print str(sim.data_parser.get_all("SYSTEM")) interfaz.show(str(sim.data_parser.get_all("SYSTEM")))
def __init__(self): self.game = Game() self.interfaz = Interfaz(self) self.turno = 1 self.nombreJugador1 = "Jugador 1" self.nombreJugador2 = "Jugador 2" #posiciones del tablero y tamanos self.cuadro = 50 self.borde = 20 self.tableroPos = 30 self.BOARD_SIZE = 400
def __init__(self): self.game = Juego() self.interfaz = Interfaz(self) self.turno = 1 #se instancian los jugadores self.jugador1 = Jugador(Pieza(1, 1), "Jugador 1") self.jugador2 = Jugador(Pieza(2, 2), "Jugador 2") #posiciones del tablero y tamanos self.cuadro = 50 self.borde = 20 self.tableroPos = 30 self.BOARD_SIZE = 400 self.nombreIngresado1 = '' self.nombreIngresado2 = ''
def __init__(self): self.interfaz = Interfaz(self) self.validador = Validador() self.tablero = Tablero(8,8) # Crea un tablero 8 x 8 self.turno = 1 #se instancian los jugadores self.jugador1 = Jugador(Pieza(1,1),"Jugador 1") # Jugador con piezas negras self.jugador2 = Jugador(Pieza(2,2),"Jugador 2") # Jugador con piezas blancas self.nombreIngresado2 = "" self.nombreIngresado1 = "" #posiciones del tablero y tamanos self.espacioVentanaTablero = 50 self.cuadro = 50 self.borde = 20 self.tableroPos = 30 self.BOARD_SIZE = 400
def __init__(self): self.interfaz = Interfaz(self) self.validador = Validador() #con estas variables se crea un tablero con filas=f y columnas=c #ademas la variable turno sera para el que es el jugador que juega en cada intante siendo i el tipo de pieza o colo a como se quiera definir self.tablero = Tablero(f,c) # Crea un tablero 8 x 8 self.turno = i #se instancian los jugadores #todos los juegos tienen dos jugadores #donde i = tipo de pieza y j = color de pieza self.jugador1 = Jugador(Pieza(i,j),"Jugador 1") # Jugador con piezas negras self.jugador2 = Jugador(Pieza(i,j),"Jugador 2") # Jugador con piezas blancas self.nombreIngresado2 = "" self.nombreIngresado1 = "" #posiciones del tablero y tamanos #dichas variables para el tablero y distintos aspectos de dicho que se pueden cambiar a como desee el usuario del framework self.espacioVentanaTablero = self.cuadro = self.borde = self.tableroPos = self.BOARD_SIZE =
#Obstaculos cono = Cono() barril = Barril() ponLlan = PonLlan() barrera = Barrera() #Vehiculos carro1 = Carro1() carro2 = Carro2() carro3 = Carro3() carro4 = Carro4() carro5 = Carro5() vaca = Vaca() #Interfaz interfaz = Interfaz() #Tiempo y velocidades tiempo = 0.0 tiempoAnterior = 0.0 #Musica y sonido playsound.playsound('song.mp3', False) playsound.playsound('siren.mp3', False) def actualizar(window): global tiempo global tiempoAnterior global jugador global policia global tramo
import Interfaz import labels while True: Abrir = Interfaz.Interfaz() Abrir.Ejecutar() Jugadores = Abrir.Retornar() AbrirJuego = labels.JuegoInterfaz(Jugadores) # AbrirJuego.Imprimir() AbrirJuego.IniciarJuego()
from Interfaz import * if __name__ == "__main__": Interfaz()