JonathanSchwob / vanquish

sts style card game using ts+react+vite+tailwind
1 stars 1 forks source link

Redeal player hand #6

Closed EvanBurnette closed 1 year ago

EvanBurnette commented 1 year ago

Cards data structure was condensed from three piles into one single source of truth Cards now contain a 'deck' field Re-dealing works from a recursive function that replenishes draw from discard

JonathanSchwob commented 1 year ago

i've gone ahead and reverted because i don't think its correct to have the cards have a deck property as it goes against the principle of one way data flow that react uses. a card is a child of a deck, and separate decks have different states and functions associated with them im pretty sure.

i'm going to work on it tomorrow and reference your changes and merge some of them in as it allows. either way this is all part of the learning process and its good stuff.