def MiniMaxOpeningBlack(root, depth): """ use MINIMAX algorithm to generate a move for black in the opening""" # reverse the board root.position = MorrisGame.reverse(root.position) result = MaxMinOpening(root, depth) # reverse the result result.position = MorrisGame.reverse(result.position) root.position = MorrisGame.reverse(root.position) return result
def MiniMaxGameBlack(root, depth): """ use MINIMAX algorithm to generate a move for black """ # reverse the board root.position = MorrisGame.reverse(root.position) result = MaxMinMidEnd(root, depth) # reverse the result result.position = MorrisGame.reverse(result.position) root.position = MorrisGame.reverse(root.position) return result