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

How can I sort the cards? #1

Open
JanisE opened this issue Mar 30, 2017 · 1 comment
Open

How can I sort the cards? #1

JanisE opened this issue Mar 30, 2017 · 1 comment

Comments

@JanisE
Copy link

JanisE commented Mar 30, 2017

How can I sort the cards in a hand?

For example, I see that in your game https://cardgames.io/spades/ the hand's cards get sorted after they are finished being dealt.

Thank you!

@einaregilsson
Copy link
Collaborator

Hi. This project is pretty much abandoned, I haven't done anything with it in years. But basically you would add a sort function to the Hand class, which would sort the cards according to whatever you want, and then call the render function again to update the cards to their correct positions.

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