finish the minmax for robot player. minmax algorithm is not optimized yet.