Created
December 8, 2013 23:46
-
-
Save tarynsauer/7865261 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def apply_minimax(board, player, cell, depth, alpha, beta) | |
return get_score(board, player) if board.game_over? | |
if player.current_player? | |
maximizing_player = Maximizing.new(player) | |
alphabeta(board, maximizing_player, depth, alpha, beta) | |
else | |
minimizing_player = Minimizing.new(player) | |
alphabeta(board, minimizing_player, depth, alpha, beta) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment