use negamax instead of home made method