Exemple #1
0
def make_game(game_name, p1, p2):

    game = None
    if game_name == 'TicTacToe':
        game = TicTacToe(p1=p1, p2=p2)
    elif game_name == 'Connect Four':
        game = ConnectFour(p1=p1, p2=p2)
    elif game_name == 'Gomoku':
        game = Gomoku(p1=p1, p2=p2)
    else:
        assert (False)
    return game