# Path: betago/model.py
# class IdiotBot(GoModel):
#     '''
#     Play random moves, like a good 30k bot.
#     '''
# 
#     def __init__(self, model=None, processor=ThreePlaneProcessor()):
#         super(IdiotBot, self).__init__(model=model, processor=processor)
# 
#     def apply_move(self, color, move):
#         self.go_board.apply_move(color, move)
# 
#     def select_move(self, bot_color):
#         move = get_first_valid_move(
#             self.go_board,
#             bot_color,
#             # TODO: this function is gone. retrieve it.
#             generate_randomized(all_empty_points(self.go_board))
#         )
# 
#         if move is not None:
#             self.go_board.apply_move(bot_color, move)
#         return move


import os
import webbrowser
from betago.model import IdiotBot

# Open web frontend
path = os.getcwd().replace('/examples', '')
webbrowser.open('file://' + path + '/ui/demoBot.html', new=2)

# Create an idiot bot, creating random moves and serve it.
go_bot = IdiotBot()

# Path: betago/model.py
# class IdiotBot(GoModel):
#     '''
#     Play random moves, like a good 30k bot.
#     '''
# 
#     def __init__(self, model=None, processor=ThreePlaneProcessor()):
#         super(IdiotBot, self).__init__(model=model, processor=processor)
# 
#     def apply_move(self, color, move):
#         self.go_board.apply_move(color, move)
# 
#     def select_move(self, bot_color):
#         move = get_first_valid_move(
#             self.go_board,
#             bot_color,
#             # TODO: this function is gone. retrieve it.
#             generate_randomized(all_empty_points(self.go_board))
#         )
# 
#         if move is not None:
#             self.go_board.apply_move(bot_color, move)
#         return move


# Path: examples/run_idiot_bot.py
import os
import webbrowser
from betago.model import IdiotBot


# Open web frontend
path = os.getcwd().replace('/examples', '')
webbrowser.open('file://' + path + '/ui/demoBot.html', new=2)

# Create an idiot bot, creating random moves and serve it.
go_bot = IdiotBot()

go_bot.run()