from examplegame import *
# create the initial board


done = False
while not done:
    game = theGame() 
    game.printBoard()
    while game.getResult() == 0:
        #game is still on
        #switch players
        game.switchPlayers()
        #make a move
        move = 0
        #Get a valid move from the current player
        while not game.isValidMove(move):
            move = int(input(f"Player {game.getPlayer()+1}, Make your next move> "))
        game.makeMove(move)
        game.printBoard()

    if game.getResult() == 2:
        print ("This game ended in a draw!")
    else:
        print (f"Player {game.getPlayer()+1}, Won this game")
    again = input("Do you want to play again(Y/N)? ")
    done = (again != "Y")
