adjusted negamax, game-loop, and UI