JavaScript : Tic-Tac-Toe spinoff : Refactor of mic-mac-moe