C. Program Description for Developers

A=14;- ace has the value of 14
K=13;- king has the value of 13
Q=12;- queen has the value of 12
J=11;- jack has the value of 11
graphics = RedDeck{1:52};- the graphics that display the images of each card
Deck- array of all the values of each card
CardN – array of 52 values for 52 cards in a deck

ShuffledDeck- randomizes/shuffled the deck

hand1- first 26 cards of the shuffled deck, player 1

hand2 -last 26 cards of the shuffled deck, player 2

numberOfTurns- shows the total number of turns played when the game is finished

While loop for the whole game-
stop = 0; – conditional statement for the whole game, while stop = 0 the game will run, when someone wins stop = 1 and the game stops

if statement- compare the top card, player with higher card adds both their own card and the other player’s card to the bottom of the deck

if statement- if one player has all 52 cards, they win, the game ends

While loop for the tie breaker-

if statement- compares the length of each hand so that if one player has less than three cards only the last card available will be compared if there is a tie(card one if only one card is left, card two if two cards are left)

stopWar = 0;  – conditional statement for when the top cards are the same, while stopWar = 0 the tiebreaker system will run, when someone wins the hand stopWar = 1 and the tiebreaker stop

i = 3;- index for the tiebreaker loop

– if statement- first compares the 3rd cards, if the third card of each hand is the same the i will change to i = 5 and the 5th cards will be compared, and so on, i = i + 2