Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The code source needed for this is c++. Please help as much as you can. Programming Assignment 5 CSC 1060 Problem Description: Create a deck
The code source needed for this is c++. Please help as much as you can.
Programming Assignment 5 CSC 1060 Problem Description: Create a deck of cards. You should create functions to initialize the deck, shuffle the deck, display the deck, and deal a hand of N cards to M different players. Displaying a players hand, the cards do not need to be in any particular order. You can store the cards as an array of strings. It is fine to define this as a global array so you can have access to the deck without needing to pass the array of cards around as a parameter of the function. AC 2C 3C 4C 5C 6C 7C8C 9C 10C JC QCKC Example I/O Initia1 Deck: AS 2S... QD KD Shuffle Deck: QH 3S .. . KH 5C How many cards are in the hand: 5 How many players: 4 Player 1: 5C 9H 2S 2D AS Player 2: AH 8C 7C 7S 7D Player 3: 4S 2H JC JS KH Player 4: QH QC 5S 8C 9S Scope: 3: Only one player and a 5-card hand. 4: N players and M-card hands. 5: Include an optional extension. Optional Extensions: Sort the players hands in order State player with winning hand. Resort the deck after it has been shuffled Allow player to redraw cards in hand if they do not like it. (Player select discarded cards) Programming Assignment 5 CSC 1060 Problem Description: Create a deck of cards. You should create functions to initialize the deck, shuffle the deck, display the deck, and deal a hand of N cards to M different players. Displaying a players hand, the cards do not need to be in any particular order. You can store the cards as an array of strings. It is fine to define this as a global array so you can have access to the deck without needing to pass the array of cards around as a parameter of the function. AC 2C 3C 4C 5C 6C 7C8C 9C 10C JC QCKC Example I/O Initia1 Deck: AS 2S... QD KD Shuffle Deck: QH 3S .. . KH 5C How many cards are in the hand: 5 How many players: 4 Player 1: 5C 9H 2S 2D AS Player 2: AH 8C 7C 7S 7D Player 3: 4S 2H JC JS KH Player 4: QH QC 5S 8C 9S Scope: 3: Only one player and a 5-card hand. 4: N players and M-card hands. 5: Include an optional extension. Optional Extensions: Sort the players hands in order State player with winning hand. Resort the deck after it has been shuffled Allow player to redraw cards in hand if they do not like it. (Player select discarded cards)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started