finished negamax, other functions. testing still needed.