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

Make the next_action part into a generator. #8

Closed
deontologician opened this issue Mar 10, 2012 · 0 comments
Closed

Make the next_action part into a generator. #8

deontologician opened this issue Mar 10, 2012 · 0 comments
Assignees
Milestone

Comments

@deontologician
Copy link
Owner

So at the beginning of an encounter, the generator is initialized with cycle(self.dna). In this way, we can avoid having to reinitialize the self.dna_cycler every fight (which I wanted to do), and also allow a more natural and encapsulated way to generate the next action of a guy. Also, we could pickle the creature directly, since it won't contain a cycle object!

This could also be used in conjunction with the fight context manager I want to make in issue #9

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