Problem Description Develop a simple guessing game called Find the Clippy. The Clippy is an imaginary...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Two countries called East and West agree to unify. The real value of full-employment output in East is 1 trillion widgets, and in West it is 2 trillion widgets. The combined full-employment output of...
-
Each pair of matrices differ by one row operation. Use this operation to compare det(A) with det(B). (a) (b) (c) 3 1 0 1-1 3 1-1 3 10 4
-
Is there anything that you find particularly impressive about Southwest Airlines? What grade would you give Southwest management for the job it has done in crafting the company's strategy? What is it...
-
A company is implementing Dynamics 365 Supply Chain Management. The company plans to implement the solution in a phased approach across several incremental projects. The project manager needs a...
-
Describe goalpost conformance.
-
Solve each quadratic inequality. Graph each solution. x 3 + 7x 2 + 12x 0
-
Two electrons move near each other and at the instant shown in Figure P28.85 are \(2.0 \mathrm{~mm}\) apart. The speed of electron 1 is \(v_{1}=300 \mathrm{~m} / \mathrm{s}\), that of electron 2 is...
-
Equipment acquired on January 3, 20Y3, at a cost of $415,000, has an estimated useful life of 15 years, has an estimated residual value of $32,500, and is depreciated by the straight-line method. a....
-
6. For an SHM oscillator, the amplitude is 5 cm and its time period is 4 seconds. The minimum time taken by the particle to pass between points which are at distances 4 cm and 3 cm from the centre of...
-
1. Identify where (in its value system) and how IKEA have achieved cost leadership. 2. Identify how IKEA have achieved differentiation from their competitors. 3. Explain how IKEA tries to ensure that...
-
Winfrey Designs had an unadjusted credit balance in its Allowance for Doubtful Accounts at December 31, 2020, of $1,850. Required: a. Prepare the adjusting entry assuming that Winfrey estimates...
-
Accounting for natural disasters. The earthquake-cum-tsunami that devastated part of Japan on March 11, 2011, is estimated to be a loss of US$250 billion. What is its likely impact on the Japanese...
-
Taiwans official reserve account. Assume that in 2012 Taiwan ran a surplus on its current account of US$125 billion and a capital account deficit of US$25 billion. What would be the net impact on...
-
Because preschool is not mandatory in most states, how can the mainstreaming goals of the IDEA be accomplished for children under age 5?
-
Ashley is 5 and autistic. The evaluations done by the parents evaluators indicate that Ashley requires a full-day program in order to benefit from an educational program. In the state where Ashley...
-
Brittany is an 18-year-old individual with a hearing impairment whose parents have been disputing during the past three years whether the school has been providing an appropriate education. Brittany...
-
Let S be a solid of revolution obtained by rotating the finite region bounded by the curves y = sin x, x = Slicing/Disk A=T f/ cos xdx B= T S/2 sin? adr Tf (arcsin x)dx D=T (arccos x)dx C=T Shell...
-
1. Which of the four major types of information systems do you think is the most valuable to an organization? 2. How do you critically associate the ideas of business agility and business efficiency...
-
Professor Goodheart always gives two midterms in his communications class. He only uses the higher of the two scores that a student gets on the midterms when he calculates the course grade. (a) Nancy...
-
Kens utility function is uK(x1, x2) = x1 + x2 and Barbies utility function is uB(x1, x2) = (x1 + 1) (x2 + 1). A person can buy 1 unit of good 1 or 0 units of good 1. It is impossible for anybody to...
-
Willy Wheelers preferences over bundles that contain nonnegative amounts of x1 and x2 are represented by the utility function U(x1, x2) = x12 + x22 Draw a few of his indifference curves. What kind of...
-
With a neat sketch of a room air-conditioner, explain its working principle.
-
Explain the working of domestic refrigeration system with a neat sketch?
-
The dynamic viscosity of lubricating oil used between shaft and sleeve is 12 poise. The diameter of the shaft, which rotates at \(240 \mathrm{rpm}\), is 0.5 \(\mathrm{m}\). The sleeve length is \(120...
Study smarter with the SolutionInn App