User Tools

Site Tools


notes:discrete:fall2023:projects:cgf0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:discrete:fall2023:projects:cgf0 [2023/10/05 02:03] – [VALUES] cfoster8notes:discrete:fall2023:projects:cgf0 [2023/10/05 02:09] (current) – [SUITES] cfoster8
Line 9: Line 9:
 ====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 32: 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 ''temp'' in these examples). This will be used to link up ''current->prev'' once we move past the first node. With ''temp'' created, the general order you'll want to follow is: 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 ''temp'' in these examples). This will be used to link up ''current->prev'' once we move past the first node. With ''temp'' created, the general order you'll want to follow is:
 +  - Set temp equal to the current pointer
   - Allocate the structure memory into ''current->next''.   - Allocate the structure memory into ''current->next''.
   - Move the current pointer to the next node.   - Move the current pointer to the next node.
Line 66: Line 67:
 </code> </code>
 If button "a" is clicked then the next card in the deck is displayed. If button "a" is clicked then the next card in the deck is displayed.
 +
 +Alternatively, you can use the arrow keys to do the same thing, reading XDirection or YDirection respectively in place of "a" or "b".
  
 ==Randomizing Your Deck== ==Randomizing Your Deck==
notes/discrete/fall2023/projects/cgf0.1696471409.txt.gz · Last modified: 2023/10/05 02:03 by cfoster8