Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem Description Develop a simple guessing game called Find the Clippy. The Clippy is an imaginary creature that hides somewhere in a two-dimensional 9x9
Problem Description Develop a simple guessing game called "Find the Clippy". The Clippy is an imaginary creature that hides somewhere in a two-dimensional 9x9 game-board. Each time the game is run, the program places the Clippy at a random position in the game-board (a row and column pair) and the player has a maximum of five (5) guesses to guess the Clippy's location. The Clippy does not move during the game. If the player finds the Clippy, the program reports the success and ends. If the player does not find the Clippy the program gives a hint about what direction to the player move to find the Clippy. The hint must be correct; the program doesn't lie or mislead the player! There are eight possible hints: north, northeast, east, southeast, south, southwest, west, and northwest. The program must detect guesses that are not in the game-board and re-prompt until a valid value is given (invalid guesses don't count as one of the five). When the program starts, and after each turn, a map of the game-board is displayed, showing rows and columns as shown below. ? Turns: 0 After each turn the map is displayed with an X marking the location of the move. If the players use all their turns, they lose and the Clippy's location is revealed. If they guess the location of the Clippy they win, and the Clippy is shown as an C in the map. At each turn the player can enter a move, which is a letter and a number (with no blanks), such as D8. Or they can enter 'n' for a new game, or 'q' to quit. Here is a sample execution output. A ? D4 Turns: 0 A 1 ? G7 Turns: 1 Hint: SOUTHEAST ? H5 Turns: 2 Hint: SOUTHWEST ? 15 1 Turns: 3 Hint: SOUTH North North-West North-East West * East South-West South-East South 6 7 1 2 2 3 4 5 6 7 8 9 Turns: 4 You found the Clippy! ? q game over 8 9
Step by Step Solution
★★★★★
3.44 Rating (151 Votes )
There are 3 Steps involved in it
Step: 1
To implement the Find the Clippy guessing game you can follow these steps Define a 9x9 game board as a 2D array with rows and columns numbered 19 Generate a random row and column as the Clippys locati...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