Added multigame support and fixed the minimax algorithm.