hwoodward / Remote-Card-Games

Program for playing card games online/remotely. Goal is to play a game of hand and foot with multiple groups in different locations.
MIT License
2 stars 1 forks source link

Card wrapping confusion for identical cards. #104

Closed slwoodward closed 4 years ago

slwoodward commented 4 years ago

After picking up the pile cards identical to those just played may have wrong position/status (code confuses the new cards with those just played, and puts them in old cardwrapper). There is a similar problem between rounds. Also sometimes only see a subset of the new hand at start of a new round.

Sort hand usually fixes problem (might need to clear prepared cards--I'm not certain) but player shouldn't have to do that.

Try to remove wrapping from cards, but be careful not to remove wrapping of cards that fail to play (i.e. when you. try to pick up pile, but can't).

slwoodward commented 4 years ago

Fixed in OrganizeGUIcode on 3/29/2020. Will close this when that branch is ready to be merged with Master branch.

slwoodward commented 4 years ago

Fixed by removing wrapped cards after prepared cards are played (either player hits play prepared cards button or picks up the pile) and length of prepared cards returns = 0. To fix problem at the beginning of a later round, reset hand_info =[] when player ready: yes.