Try to fix minimax algorithm