sapai icon indicating copy to clipboard operation
sapai copied to clipboard

`__copy__` or `__deepcopy__` functions

Open alexdriedger opened this issue 3 years ago • 0 comments

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.

alexdriedger avatar Feb 10 '22 11:02 alexdriedger