Tic-tac-toe in Node.js for learning