Exemple #1
0
def hunt(predatorGenome, preyGenome, turnlimit, printing):
    env = Environment(predatorGenome, preyGenome, printing)
    capture = False
    turnCount = 0
    while capture != True:
        if turnCount == turnlimit:
            break
        capture = env.turn()
        turnCount += 1
        #time.sleep(10)
        
    if printing == True: pylab.show(block=True)
    return turnCount