Skip to content

Expose visitor pattern for traversing trees#733

Merged
tturocy merged 5 commits intomasterfrom
dev_visitor
Jan 7, 2026
Merged

Expose visitor pattern for traversing trees#733
tturocy merged 5 commits intomasterfrom
dev_visitor

Conversation

@tturocy
Copy link
Copy Markdown
Member

@tturocy tturocy commented Jan 7, 2026

This refactors the implementation of traversing the nodes in a tree to expose a full visitor-pattern interface. The existing preorder and postorder traversal modes are now implemented as special cases of the visitor pattern.

This re-implements two algorithms to eliminate recursion by using the visitor pattern:

  • Determining if a game is constant-sum
  • Determining the minimum/maximum payoff to a player in any play of the game.

@tturocy tturocy merged commit 941eea7 into master Jan 7, 2026
25 checks passed
@tturocy tturocy deleted the dev_visitor branch January 7, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant