/Card-Game

An Undergraduate Research Programming assignment to asses my ability and knowledge in C++

Primary LanguageC++

Card-Game

An Undergraduate Research Programming assignment to asses my ability and knowledge in C++

Using the C++ programming language, create an implementation for a simple game of cards. The user should should be able to perform the following operations:

  1. Draw a card to hand
  2. Place a card in hand on top of the deck
  3. Shuffle the deck
  4. Sort the deck
  5. Print cards that exist in hand

This deck should be able to hold different types of cards. Allow the user to choose a deck of 60 simple cards that are numbered from 0 to 59, or a deck of traditional playing cards (52 cards of 4 suites, values two to ace). When sorting the playing cards, sort them by suite first, then by value, meaning all the hearts, diamonds, clubs, and spades should be together.

Sample Output:

Please choose a deck to play!

  1. Simple Deck
  2. Traditional Deck

2

Choose an option :)

  1. Draw a card to hand
  2. Place a card in hand on the deck
  3. Shuffle the deck
  4. Sort the deck
  5. Print cards that exist in hand
  6. Quit fsdf Invalid input, try again

Choose an option :)

  1. Draw a card to hand
  2. Place a card in hand on the deck
  3. Shuffle the deck
  4. Sort the deck
  5. Print cards that exist in hand
  6. Quit 1 You have drawn Ace of Hearts to your hand

Choose an option :)

  1. Draw a card to hand
  2. Place a card in hand on the deck
  3. Shuffle the deck
  4. Sort the deck
  5. Print cards that exist in hand
  6. Quit 1 You have drawn Deuce of Hearts to your hand

Choose an option :)

  1. Draw a card to hand
  2. Place a card in hand on the deck
  3. Shuffle the deck
  4. Sort the deck
  5. Print cards that exist in hand
  6. Quit 5 Your cards on hand currently are : Ace of Hearts, Deuce of Hearts,

Choose an option :)

  1. Draw a card to hand
  2. Place a card in hand on the deck
  3. Shuffle the deck
  4. Sort the deck
  5. Print cards that exist in hand
  6. Quit 3 Your deck is shuffled

Choose an option :)

  1. Draw a card to hand
  2. Place a card in hand on the deck
  3. Shuffle the deck
  4. Sort the deck
  5. Print cards that exist in hand
  6. Quit 4 Your deck is sorted

Choose an option :)

  1. Draw a card to hand
  2. Place a card in hand on the deck
  3. Shuffle the deck
  4. Sort the deck
  5. Print cards that exist in hand
  6. Quit 6

Thank you for playing and see you again! logout

[Process completed]