Esempio n. 1
0
def runGame():
    a, b = findMatch()
    if a == None:
        print("All games have now been played. Here are the final scores:")
        printResults()
        mainloop.quit()
        return
    current[0] = a
    current[1] = b

    game = GameModel(TimeModel(minutes * 60, 0))
    game.connect('game_started', cb_gamestarted)
    game.connect('game_ended', cb_gameended)
    p0 = discoverer.initPlayerEngine(engines[a],
                                     WHITE,
                                     8,
                                     variants[NORMALCHESS],
                                     secs=minutes * 60,
                                     incr=0,
                                     forcePonderOff=True)
    p1 = discoverer.initPlayerEngine(engines[b],
                                     BLACK,
                                     8,
                                     variants[NORMALCHESS],
                                     secs=minutes * 60,
                                     incr=0,
                                     forcePonderOff=True)
    game.setPlayers([p0, p1])
    game.start()
Esempio n. 2
0
def do(discoverer):
    game = GameModel(TimeModel(60,0))
    #game.connect('game_started', cb_gamestarted2)
    game.connect('game_ended', lambda *a: mainloop.quit())
    p0 = discoverer.initPlayerEngine(discoverer.getEngines()['rybka'], WHITE, 7, variants[NORMALCHESS], 60)
    p1 = discoverer.initPlayerEngine(discoverer.getEngines()['gnuchess'], BLACK, 7, variants[NORMALCHESS], 60)
    game.setPlayers([p0,p1])
    game.start()
Esempio n. 3
0
def runGame():
    a, b = findMatch()
    if a == None:
        print("All games have now been played. Here are the final scores:")
        printResults()
        mainloop.quit()
        return
    current[0] = a
    current[1] = b
    
    game = GameModel(TimeModel(minutes*60,0))
    game.connect('game_started', cb_gamestarted)
    game.connect('game_ended', cb_gameended)
    p0 = discoverer.initPlayerEngine(engines[a], WHITE, 8, variants[NORMALCHESS], secs=minutes*60, incr=0, forcePonderOff=True)
    p1 = discoverer.initPlayerEngine(engines[b], BLACK, 8, variants[NORMALCHESS], secs=minutes*60, incr=0, forcePonderOff=True)
    game.setPlayers([p0,p1])
    game.start()