User Tools

Site Tools


notes:discrete:fall2023:projects:cgf0

This is an old revision of the document!


CGF0

STANDARD 52-CARD DECK

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.

SUITES

The four suits in a standard deck include hearts, diamonds, spades, and clubs.

Structure For Doubly Linked List

A doubly linked list offers us the option to move both backward and forwards in a list. This is done by adding a pointer to the previous node. Here is an example of a structure of a doubly linked list:

struct cardnode
{
    bool Active;
    int Rcard;         // Card id to call for displaying
    cardnode* next;    // Pointer to the next card node
    cardnode* prev;    // Pointer to the previous card node
};

We originally had just a pointer next for a single linked list but now we have added a pointer for prev.

Setting Up Buttons

To use a keyboard and take input you first need to call the following inside your main function but outside your game loop:

select_gamepad(0);
notes/discrete/fall2023/projects/cgf0.1696088306.txt.gz · Last modified: 2023/09/30 15:38 by wgates1