A negamax implementation for Node JS.