-
-
Notifications
You must be signed in to change notification settings - Fork 249
Open
Labels
Description
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