Mathematicians TicTacToe implemented in Javascript