implemented js code for tictactoe