[Python] Python script to test game

Discussão em 'Python' iniciado por Stack, Março 28, 2025.

  1. Stack

    Stack Membro Participativo

    I've written a game entitled reversi.py that I want to write a script for to aid in testing. The game is AI based and takes a good amount of time to run. I was hoping to write a script to run the game and output it's results to a file so I could run the game x amount of times while I go do other things and come back to it. I'm stuck at trying to call the game from the script file. Here is what I have so far:

    from games import *
    from reversi import *

    def main():

    f = open('Reversi Test', 'w')


    if __name__ == '__main__':
    main()


    Thanks in advance!

    Continue reading...

Compartilhe esta Página