Javascript implementation of tic-tac-toe (en-gb: "Naughts and Crosses")