-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Multiple card.throwIn doesn't work correctly #123
Comments
Looks like an easy to pick up PR. |
Hey! Following are the steps we followed in order to reproduce the issue:
Add And trying throwing in and throwing out the cards. But the stack order looks good and hence not able to reproduce the issue. Not sure if I followed correct steps. Will need some help. 🙇♀️ |
If we get 5 cards and consistently swing 3, than call card.throwIn three times we do not get the desired stack — first card3.throwIn return the corerct card to the top of stack, but other calls will return next cards (card2, card1) behind the third
Steps:
Initial stack
card1
card2
card3
card4
card5
Swinging first 3..
State 1:
Stack
card4
card5
Trash
card3
card2
card1
Starting throwIn
card3.throwIn(0,0)
State 2:
Stack
card3
card4
card5
Trash
card2
card1
Continue throwIn
card2.throwIn(0,0)
State 3:
Stack
card3
card2
card4
card5
Trash
card1
Continue throwIn
card1.throwIn(0,0)
State 4:
Stack
card3
card2
card1
card4
card5
Trash empty
Any ideas? Thanx
The text was updated successfully, but these errors were encountered: