Page 1 of 1

I need some help with this C++ memory card game program. i will Upvote if correct answer is provided . eg sample output

Posted: Thu Jul 14, 2022 2:12 pm
by answerhappygod
I need some help with this C++ memory cardgame program.
i will Upvote if correct answer is provided.
eg sample output screenshot
thank you !
R0.1 Game Board
The game board has a size of 8 x 8 pieces
An example of game board is given below:
I Need Some Help With This C Memory Card Game Program I Will Upvote If Correct Answer Is Provided Eg Sample Output 1
I Need Some Help With This C Memory Card Game Program I Will Upvote If Correct Answer Is Provided Eg Sample Output 1 (5.45 KiB) Viewed 23 times
R0.2 Unknown Piece
Each piece has two sides, each of which bears a letter and anumber. A piece's number-side is disclosed when it is unveiled. Itshows how many times the player can flip the piece over to revealthe secret letter on the other side.
The number of maximum trials has a default value of 5 and willbe decreased each time after turning over to see the hidden letterin the other side.
The default range for the letter is from A to F. Before choosinga piece and flipping it over to reveal the letter, you cannot seethe letter. When the game begins, all of the pieces should begenerated at random. To prevent the entire game board having thesame letter for all of the pieces, make sure the generated pieceshave at least two different letters.
R0.3 Rules
Each time, the player can select a piece from the game board andflip it over to reveal the letter by indicating the row index andcolumn index.
Players can select another unrevealed piece to match the letterof the revealed piece when there is only one piece on the gameboard that is revealing a letter. The two pieces will be eliminatedfrom the game board if they share the same letter. The numberassociated with both pieces will be reduced by one if the letterson the two pieces do not match. The game is over if any of themreaches zero. Otherwise, the two pieces will be turned over and thenumbers will be shown once more.
The following example shows how to select a piece that has notyet been revealed, with the relevant piece at each stage beinghighlighted in red: First, choose the component that is in Row 2and Column 1.
I Need Some Help With This C Memory Card Game Program I Will Upvote If Correct Answer Is Provided Eg Sample Output 2
I Need Some Help With This C Memory Card Game Program I Will Upvote If Correct Answer Is Provided Eg Sample Output 2 (6.82 KiB) Viewed 23 times
I Need Some Help With This C Memory Card Game Program I Will Upvote If Correct Answer Is Provided Eg Sample Output 3
I Need Some Help With This C Memory Card Game Program I Will Upvote If Correct Answer Is Provided Eg Sample Output 3 (20.27 KiB) Viewed 23 times
R0.4 Player Action
The player must enter a row index and a column index for eachround that corresponds to the position of a piece that has not yetbeen revealed on the game board. If the chosen piece is present onthe game board, it will be turned over to reveal the letter thatgoes with it. If the player makes any errors in their actions orinput, appropriate and meaningful error messages should be printed.The player is then free to choose a piece once more.
i will Upvote if correct answer is provided.
eg sample output screenshot
thank you !
5​5​5​5​5​5​5​ 55555555 5​5​5​5​5​5​5​5​ 5​5​5​5​5​5​5​ 5​5​5​5​5​5​ 5​5​5​5​5​5​5​5​ 5​5​5​5​5​5​5​ 5​5​5​5​5​5​5​
First, select the piece located at Row 2 and Column 1
Second, select the piece located at Row 1 and Column 2 Third, the letters of the two revealed piece do not match so their numbers are both decreased by one Fourth, select the piece located at Row 3 and Column 4 1234 Fifth, select the piece located at Row 2 and Column 1 1234