big tictactoe in javascript with simple AI