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

Save random generator in constructor #107

Merged
merged 1 commit into from
Jun 16, 2018
Merged

Save random generator in constructor #107

merged 1 commit into from
Jun 16, 2018

Conversation

davepagurek
Copy link
Member

Fixes #71

Basically, we already implemented separate random seeds in the editor, but it only works right now because our example code happens to not use any runtime random number generation. We need to have any internal functions that use random numbers capture the generator when constructed, and then use that at runtime.

In the future when implementing #52, it will also need to use the pattern of saving a reference to the current random number generator in the constructor.

Copy link
Member

@armcburney armcburney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@davepagurek davepagurek merged commit 0f2c9d2 into master Jun 16, 2018
@davepagurek davepagurek deleted the save-random branch June 16, 2018 21:30
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.

2 participants