Ejemplo n.º 1
0
def run_from_file(src_file,
                  team_a=('equipoA', xdg_data_path('images/piece-orange.png')),
                  team_b=('equipoB',
                          xdg_data_path('images/piece-violete.png')),
                  path_piece_def=xdg_data_path('images/piece-default.png'),
                  xml_file=xdg_data_path('layouts/alternative-layout.xml')):
    """
    Muestra un juego en pantalla directamente desde un fichero de un juego
    previamente simulado
    """
    name_a, name_b = filenames.extract_names_from_file(src_file)

    team_a = (name_a, team_a[1])
    team_b = (name_b, team_b[1])

    _load_game_from_file(src_file, team_a, team_b, path_piece_def, xml_file)
Ejemplo n.º 2
0
def run_from_file(src_file,
                  team_a=('equipoA',
                         xdg_data_path('images/piece-orange.png')),
                  team_b=('equipoB',
                         xdg_data_path('images/piece-violete.png')),
                  path_piece_def=xdg_data_path('images/piece-default.png'),
                  xml_file=xdg_data_path('layouts/alternative-layout.xml')):
    """
    Run a game directly from a file, not simulating a game.
    """
    name_a, name_b = filenames.extract_names_from_file(src_file)
    team_a = (name_a, team_a[1])
    team_b = (name_b, team_b[1])
    winner = _load_game_from_file(src_file, team_a, team_b,
                                  path_piece_def, xml_file)

    return winner
Ejemplo n.º 3
0
def run_from_file(src_file,
                  team_a=('equipoA', xdg_data_path('images/piece-orange.png')),
                  team_b=('equipoB', xdg_data_path('images/piece-violete.png')),
                  path_piece_def=xdg_data_path('images/piece-default.png'),
                  xml_file=xdg_data_path('layouts/alternative-layout.xml')):
    """
    Muestra un juego en pantalla directamente desde un fichero de un juego
    previamente simulado
    """
    name_a, name_b = filenames.extract_names_from_file(src_file)

    team_a = (name_a, team_a[1])
    team_b = (name_b, team_b[1])

    _load_game_from_file(src_file, 
                         team_a, team_b,
                         path_piece_def, xml_file)