adds minimax algorithm