 COLOR_TO_CLASS[WHITE] = 'white'
 
 board = null
-worker = null
+mcts_worker = null
 
 scaleBoardTo = (number)->
   stretchRowsTo = (number)->


start_mcts = (board)->
  console.log print_board(board)
  worker.postMessage(board: board, max_playouts: 100)

set_move_on_ui_board = (move)->
  $target_cell = $("table.go-board tr:nth-child(#{move.y + 1}) td:nth-child(#{move.x + 1})")

  board = initBoard(board_size)
  console.log board

  mcts_worker = new Worker 'lib/javascripts/worker/tree_worker.js'
  mcts_worker.addEventListener 'message', (message)->
    if message.type == 'Error'
      console.log message.data.message
    else
