Handle empty hand slots properly #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "timotree/deck-website:null-cards"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Empty slots in the hand are now represented by a
nullcard. I carefully checked every use ofstate.handto make sure this is accounted for properly.Fixes bugs where:
Empty slots in the hand are now represented by a `null` card. I carefully checked every use of `state.hand` to make sure this is accounted for properly. Fixes bugs where: - Styles are not removed when a card becomes an empty slot. - Importing a game crashes when it contains an action on a slot to the right of an empty slot. - Updating the DOM crashes when a player clues and the next player's leftmost slot is empty. - In order to fix this, I changed the default rank clue to be the highest rank, rather than the rank of their leftmost slot.thanks