       result
 
     stoneDivsForPos = (i, j) ->
-      result = switch boardState[j][i]
+      color = boardState[j][i]
+      if proposedMove?
+        _lastPlayed = proposedMove
+        if proposedMove.x == i and proposedMove.y == j
+          color = proposedMove.color
+      else
+        _lastPlayed = lastPlayed
+      result = switch color
         when 'black' then [blackStone]
         when 'white' then [whiteStone]
         else []
-      if i == lastPlayed.x and j == lastPlayed.y
+      if i == _lastPlayed.x and j == _lastPlayed.y
         result.push lastPlayedMarker
       result
+
+    onClickForPos = (i, j) => (event) =>
+      @props.placeStoneCallback {
+        x: i
+        y: j
+      }
 
     div {className: 'goban'},
         for j in [0...size]
           div {className: 'goban-row'},
               for i in [0...size]
-                div {className: "gopoint row-#{j} col-#{i}"},
+                (div {
+                  className: "gopoint row-#{j} col-#{i}"
+                  onClick: onClickForPos(i, j)},
                     (boardDivsForPos i, j),
-                    (stoneDivsForPos i, j)
+                    (stoneDivsForPos i, j))
 
 NavigationDom = React.createClass
   render: ->


BoardAreaDom = React.createClass
  getInitialState: ->
    viewingMove: null

  onNavigate: (newViewingMove) ->

      result.push getClone(v, result)
    return result
  return cloneObjectRecursive sgfObject, null

nextPlayerInSgfObject = (sgfObject) ->
  nodes = sgfObject.gameTrees[0].nodes
  reversedNodes = nodes.slice(0).reverse()  # slice(0) copies
  for node, index in reversedNodes
    if 'B' of node
      return 'white'
    else if 'W' of node
      return 'black'
    else if 'TCRESUME' of node
      # next to move is the first to pass before this resumption
      return _lastPassInRun reversedNodes.slice(index + 1)
  return 'black'
