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

  $('.go-board td').click ->
    if $(this).is(':empty') && current_color == BLACK
        move = create_move_from_ui_move($(this), current_color)
        set_move_on_ui_board(move)
        play_stone(move, board)
        current_color = WHITE
        start_mcts(board)
        current_color = BLACK


               ($td.data('y')),
               color)

clean_board = ->
  $('.go-board td').each (i, cell)->
    $(cell).empty()

update_ui_board = (board)->
  clean_board()
  all_fields_do board, (x, y, color)->
    if (color == BLACK) || (color == WHITE)
      set_move_on_ui_board create_stone(x, y, color)

$ ->
  current_color = BLACK
  board_size = 9
