Question
You will create a program that will play a card guessing game. The program will randomly select a card and player's goal is to guess
You will create a program that will play a card guessing game. The program will randomly select a card and player's goal is to guess this card and its face value. If the player correctly guesses the number he will move on to next level, where he will have to guess two randomly selected card and value using the remaining attempts. This will continue until level 5 (five randomly selected cards) after which the game completes and the player wins the game.
The game will progress from Level 1 to Level 5 using set of standard 52 cards.
Player will get points for every correct guess. Every incorrect guess reduces available life/chances to continue the game. Point is based on the number of attempts and current level (check the rules section to understand how to calculate this). You will keep track of player's points and display it at the end of every level and at the end of game.
Game Rules & Requirements
1.)The game will start at Level 1.
2.)At start of a level, the program will first display the Level Number and how many cards they have to guess.
3.)Program will then select a random card(s) based on the level; level 1 1 card, level 2 2 cards, level3 3 cards etc.
4.)The program will then allow the user to guess a total of 3 times (lives) per card.
5.)User will have to guess the card suit, Hearts, Diamonds, Clubs and Spades, and the face value of the card (Ace, 2 to 10, Jack, Queen, King).
6.)User will get 3 chances to guess both suit and value correctly.
7.)If user correctly guesses either suit or value, answer is still incorrect. However, you will let user know that one of the guesses is correct but wont say which one.
8.)At every failed attempt, program will give hints regarding the value of the card. It will tell user if the actual value is higher or lower than the entered face value. Assume Ace is lowest value (1) and King is highest (King>Queen > Jack>10). Number valued card represent their face value.
9.)If both suit and value is correct, program will notify the user that s/he has guessed the card correctly, then it will display points gained and total accumulated points so far in the game.
10.)Program will move to next level after correct guess. If it is the last level then game finishes, and user has won game.
11.)Program will track how many attempts user is using per card.
12.)If the user exhausts all the attempts (3 attempts per card per level), then the game finishes. Display Game Over then show total points.
13.)If the player successfully finishes Level 5 then a congratulatory message appears notifying the player that s/he won this game; e.g. Congratulations: you won the game!.
14.)At the end of the game (either winning or exhausting all attempts), the player is notified of total points, as well as points received in each level in a table form. The program prompts if the player wants to play again or exit the game.
15.)If player selects to play again; then the game starts from Level 1 again. If player selects to exit the game, then the program terminates.
16.)Total cards per level equal the level number.
17.)Total Number of Attempts Allowed: 3 per card per level.
1.)g. At Level 4, user has total of 12 (3 x 4) attempts/lives available.
18.)Points gained by correctly guessing a number =
Level Number x 1000 / Number of Attempts Used in This Level
19.)Player wins the game by completing all 5 levels.
20.)Player loses the game if he/she runs out of maximum allowed attempts at any given level.
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