   [game]
   (-> game :current-node :board))
 
+(defn current-node-id
+  "Returns the node id of the current node."
+  [game]
+  (-> game :current-node :node-id))
+
 (defn find-node-matching
   "Finds the first (as found by a depth-first search) game tree node
   matching the given predicate. If no such node is found, returns nil."

  added as the last child. If no node id is supplied, the current node of the
  game is used. If remove-existing-moves? is true, any previously existing 
  moves at the point of insertion are removed."
  [game uci-move & {:keys [node-id remove-existing-moves?]}]
  (add-move game board/move-from-uci uci-move
            (or node-id (-> game :current-node :node-id))
            remove-existing-moves?))



  id. The move is added as the last child. If no node id is supplied,
  the current node of the game is used. If remove-existing-moves? is true,
  any previously existing moves at the point of insertion are removed."
  [game san-move & {:keys [node-id remove-existing-moves?]
                    :or {node-id (current-node-id game)}}]
  (add-move game board/move-from-san san-move
            node-id
            remove-existing-moves?))


