This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:discrete:fall2023:projects:cgf0 [2023/10/05 01:11] – [SUITES] walley | notes:discrete:fall2023:projects:cgf0 [2023/10/05 02:09] (current) – [SUITES] cfoster8 | ||
---|---|---|---|
Line 5: | Line 5: | ||
====VALUES==== | ====VALUES==== | ||
- | A standard deck of playing cards has 52 cards from each of the four suits. There are 13 cards in each suit: Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, and King. | + | A standard deck of playing cards has 52 cards from each of the four suits. |
+ | There are 13 cards in each suit: Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, and King, from lowest to highest value, and then it loops around. | ||
====SUITES==== | ====SUITES==== | ||
- | The four suits in a standard deck include hearts, diamonds, spades, and clubs. | + | The four suits in a standard deck include hearts, diamonds, spades, and clubs. Spades and clubs are black colored cards, and hearts and diamonds are red. These make up the sub-classes of card types, beyond just their face value. |
===Structure For Doubly Linked List=== | ===Structure For Doubly Linked List=== | ||
Line 31: | Line 32: | ||
Adding additional nodes is where it gets more complicated. Before allocating the memory for the next node and moving the current pointer, we'll need to create a temporary pointer (called '' | Adding additional nodes is where it gets more complicated. Before allocating the memory for the next node and moving the current pointer, we'll need to create a temporary pointer (called '' | ||
+ | - Set temp equal to the current pointer | ||
- Allocate the structure memory into '' | - Allocate the structure memory into '' | ||
- Move the current pointer to the next node. | - Move the current pointer to the next node. | ||
Line 65: | Line 67: | ||
</ | </ | ||
If button " | If button " | ||
+ | |||
+ | Alternatively, | ||
==Randomizing Your Deck== | ==Randomizing Your Deck== |