pygambit.gambit.Game.copy_tree#
- Game.copy_tree(src: Node | str, dest: Node | str) None#
Copy the subtree rooted at the node src to the node dest.
Each node in the subtree copied to follow dest is placed in the same information set as the corresponding node in the original subtree under src.
It is permitted for dest to be a descendant of src. The operation uses the subtree rooted at src as it is at the time the function is called, so no infinite recursion is triggered.
The outcome associated with dest is not changed by this operation.
- Parameters:
- Raises:
MismatchError – If src or dest is not a member of the same game as this node.
UndefinedOperationError – If dest is not a terminal node.
