implementet minimax as AI