pygambit.gambit.Game.move_tree#

Game.move_tree(src: Selector, dest: Selector) None#

Move the subtree rooted at the node identified by src to the node identified by dest.

src and dest are each a Selector (an H-built expression, evaluated against this game) that must resolve to exactly one node.

Changed in version 17.0.0: src and dest are now Selector`s; a `Node or str is no longer accepted directly – build one with H.

Parameters:
  • src (Selector) – A Selector resolving to the root of the source subtree to move.

  • dest (Selector) – A Selector resolving to the destination subtree to move to. Must resolve to a terminal node.

Raises:
  • TypeError – If src or dest is not a Selector.

  • UndefinedOperationError – If dest is not a terminal node, or dest is a successor of src.

  • ValueError – If src or dest does not resolve to exactly one node.