Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__copy__ or __deepcopy__ functions #31

Open
alexdriedger opened this issue Feb 10, 2022 · 0 comments
Open

__copy__ or __deepcopy__ functions #31

alexdriedger opened this issue Feb 10, 2022 · 0 comments

Comments

@alexdriedger
Copy link
Contributor

alexdriedger commented Feb 10, 2022

Currently, the most natural way to deep copy is to create a state object and then instantiate a new instance from the state. Eg. new_player = Player.from_state(orig_player.state). This creates a state dictionary for everything that needs to be copied (eg. every shop slot, every team slot, etc.). Copy methods are a much more efficient way of providing this functionality.

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

No branches or pull requests

1 participant