Skip to content

Fix PlayerActions.__len__ iterating actions instead of infosets#938

Merged
tturocy merged 4 commits into
gambitproject:masterfrom
d-kad:fix-playeractions-len
Jun 16, 2026
Merged

Fix PlayerActions.__len__ iterating actions instead of infosets#938
tturocy merged 4 commits into
gambitproject:masterfrom
d-kad:fix-playeractions-len

Conversation

@d-kad

@d-kad d-kad commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Fixes PlayerActions.__len__, which summed len(s.actions) while iterating self.player.actions.
Now iterates self.player.infosets, matching __iter__ and the correct GameActions.__len__.

Adds a test checking len(player.actions) == len(list(player.actions)).

@d-kad d-kad added the bug label Jun 8, 2026
@tturocy tturocy merged commit 97762a8 into gambitproject:master Jun 16, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants