   $('.goban .last-played').remove()
 
 # end of setPointColor helpers
+###
 
 game_common.contains_selector = contains_selector = ($context, selector) ->
   "A helper function returns true if the given element/context contains an

  return "#{colStr}#{rowStr}"

# end of move navigation =============================================


setupState = (sgfObject, options={}) ->
  "Update the DOM board to match the given SGF object.

  If 'moves' is given as an option, include only that many moves."
  {boardState, lastPlayed, prisoners} = stateFromSgfObject sgfObject, options
  updateBoard boardState
  if lastPlayed.x? and lastPlayed.y?
    setLastPlayed ($pointAt lastPlayed.x, lastPlayed.y)
  else
    removeLastPlayed()

  setBlackPrisoners prisoners.black
  setWhitePrisoners prisoners.white
  return

stateFromSgfObject = (sgfObject, options={}) ->
  "Get a board state and associated info from an SGF object.

    result[row] ?= []
    result[row][col] = colorFromDom $this
  return result

isHandicapPoint = (size, row, column) ->
  switch size
