arthurquinn / solitaire

A solitaire engine and game interface that will eventually be deployed to the web.
0 stars 0 forks source link

Bug in resetting stock after last draw #41

Closed arthurquinn closed 6 years ago

arthurquinn commented 6 years ago

When the stock needs to be refreshed from the talon, the client is receiving a pop x cards from pile 0 and push x cards to pile 1. In this instance of the draw command, it must be pop from talon (1) and to stock(0).

bug

As is seen in the above image, while the stock has cards, the draw command is correct. We are popping 3 from the stock and adding 3 to the talon. However, when the stock is empty and it is time to refresh the stock, here we are popping 24 from the stock and pushing 24 to the talon, this should be reversed.

MSaIim commented 6 years ago

Fixed.