Please help R0 and R1.1-1.6 by using C++, please also make sure that your program can follow all the instructions that the question mentioned, and no errors (including the Logic Error, Syntax Error and Runtime Error) are allowed. Thanks.
Group Project-Match Pair Game (Due: 18:00, 22 July 2022 Friday) Expected Learning Outcomes - familiarise themselves with at least one high level language programming environment. - develop a structured and documented computer program. - understand the fundamentals of object-oriented programming and apply it in computer program development. - apply the computer programming techniques to solve practical problems. Introduction In this project, you are going to develop a Match Pair Game that runs in the command line environment. Player has an aim to match pairs of unrevealed letter pieces on a game board to complete the game. This is a group project. You need to form group with 5 to 6 members. Your group will write a Win32 Console Application program called matchpair.cpp. The requirements are listed below. System Requirements R0 When the program starts, the console should display a welcome message, and then the Main Menu of the program. User can enter the options of the corresponding actions (see R1 to R5 below). [Welcome Message designed by your group] ⋆∗∗ Main Menu ∗⋆∗ [1] Start Game [2] Settings [3] Useful feature(s) added [4] Credits [5] Exit Option (1-5):
1 [1] Start Game When the user inputs 1 in the Main Menu, the game starts with the current game settings (see R2). When the game starts, a game board (see R1.1) is shown and all pieces are unrevealed so that player can turn over each piece to see the unrevealed letter. Player has a goal to match all unrevealed pieces (see R1.2) of the game board. When it is done, the player wins. Otherwise, the player loses. 1.1 Game Board The game board has a size of 8×8 pieces (the size can be changed in settings, more on R2.1). The game board is enclosed by a boundary with characters ' ∣ ' for vertical boundary, '-' for horizontal boundary, and '+' for the corner. Each location in the board is identified by a row index and a column index. An example of game board is given below: Note: The board is indeed square shape. But the row height and character width may be different according to platform.
1.2 Unrevealed Piece Each piece has two sides: one side has a number, and the other side has a letter. When a piece is unrevealed, the side with a number is displayed. It indicates the number of times the player can turn over the piece to see the hidden letter in the other side. The number of maximum trials has a default value of 5 and will be decreased each time after turning over to see the hidden letter in the other side. The letter has a default range from A to F. You cannot see the letter until you have selected a piece to turn it over to reveal the letter. All the pieces should be generated randomly when the game starts. Make sure that the generated pieces have at least 2 different letters in order to avoid the whole game board has the same letter for all pieces. Both the number of maximum trials and the range of letters can be changed in settings (see R2.2 and R2.3). 1.3 Rules Every time, the player can choose a piece (by indicating the row index and column index) in the game board to turn it over to reveal the letter. When the game board has only one piece showing a letter, player can choose another unrevealed piece to match the letter of the revealed piece. If both pieces have the same letter, then these two pieces will be removed from the game board. If the letters of the two pieces do not match, the number associated with both two pieces will be decreased by one. If any of them reaches zero, the game ends. Otherwise, the two pieces will be turned over and displayed the numbers again. An example of choosing unrevealed pieces is demonstrated below (only a portion of the game board has been shown), with the relevant pieces at each time highlighted in red:
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 bv one Fourth, select the piece located at Row 3 and Column 4 Fifth, select the piece located at Row 2 and Column 1
Finally, the matched pieces are removed. R1.4 Player's Action In each round, the player needs to input a row index and a column index corresponding to the location of an unrevealed piece in the game board. If the selected piece is in the game board, then that piece will be turned over and revealed the letter associated with it. Appropriate meaningful error messages should be printed if the player takes any incorrect action or provides any incorrect input. The player is then allowed to select a piece again. R1.5 Quit Command ' Q ' In each round, instead of inputting the row or column index, player can input ' Q ' to quit the current game. If this happens, the system should prompt for player's confirmation. If the player inputs ' y ' or ' Y ', the player loses and the game ends (see R1.6). If the player inputs ' n ' or ' N ', the game continues at its current status. Other input is not accepted, and the system should ask the player to confirm again. R1.6 Game Ends When all unrevealed pieces have been matched and removed from the game board, the player wins and the game ends. If any unrevealed piece has been turned over more than the maximum number of trials, or there are remaining unrevealed pieces and the player decides to quit, then the player loses. The system turns over and displays all the remaining unrevealed pieces and the game ends. (Hence, the randomly generated pieces should be playable.) When the game ends, the system returns to the Main Menu.
Group Project-Match Pair Game (Due: 18:00, 22 July 2022 Friday) Expected Learning Outcomes - familiarise themselves with
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Group Project-Match Pair Game (Due: 18:00, 22 July 2022 Friday) Expected Learning Outcomes - familiarise themselves with
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!