Tic-Tac-Toe built in JavaScript