complete develope minimax algorithm