Queues

This program is a simulation of the card game War. The queues need to be implimented as a struct and functions to complete the queue operations. Your cards may also be done as a struct, but it is not required for this assignment.

Rules:

NOTE: if player one wins, enqueue the winning and losing cards consistently. This may prevent some really long, almost infinite runs.

I/O tricks

Your output needs to be formatted similar to mine. You will probably want to build the card strings using snprintf. At the end of the game make sure you tell me who won, how many hands it took, and the number of tie hands.

Here is an example run of the program.

shuffle logic

For every item find a random item to swap with. Repeat this 7 times ( typically this value is a prime close to the square of the number of items to shuffle ).

Reminder:
The structs you are creating should have its own files. All prototypes and definitions must be in the header file. the actual functions belong in a .c file, and needs to be compiled seperately.

This program is due on September 28th 29th.

The Goals