Update tictactoe.js

Updated to module pattern