Enumeration pattern for mutating game state #3
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: atiran/txtris#3
Loading…
Reference in a new issue
No description provided.
Delete branch "enumpattern"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally implemented in #1 but, after concerns of too much cloning (see #2), added a commit that limits copies to only when game mode completely changes. if the current game mode stays the same, no cloning/copying happens and struct state in the enum is mutated, else the game mode is replaced with a new one when it changes.