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

Use list operations to simplify deck operations #5

Closed
barraponto opened this issue Feb 19, 2015 · 1 comment
Closed

Use list operations to simplify deck operations #5

barraponto opened this issue Feb 19, 2015 · 1 comment

Comments

@barraponto
Copy link
Collaborator

@barraponto barraponto commented Feb 19, 2015

Issue #4 introduced list operations, allowing for four_cards = 4 * ['MyCard'].
That's cool, but we are still looping over ndecks to add the cards several times -- once per deck.
Instead, we could just have something like deck = ndecks * deck, don't you think?

@MarcoWorms
Copy link
Owner

@MarcoWorms MarcoWorms commented Feb 19, 2015

Just commited the change, thanks for the tip. BTW I'm gonna work on shrinking that bunch of "if's" in the main game loop.

@MarcoWorms MarcoWorms closed this Feb 19, 2015
@MarcoWorms MarcoWorms reopened this Feb 19, 2015
@MarcoWorms MarcoWorms closed this Feb 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.