Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

JAVA HURKLE: or this assignment, you will be creating a text-only version of a g

ID: 3767427 • Letter: J

Question

JAVA HURKLE:

or this assignment, you will be creating a text-only version of a game called Hurkle. Hurkle, a happy little beast, lives on the planet Lirht which is a flat world divided into 10 rows and columns. The Hurkle likes to hide randomly in one of those 100 plots on Lirht. It is the user's job to find the Hurkle. The player will enter a horizontal (x) coordinate, followed by a vertical (y) coordinate. The Hurkle will then give a clue as to where it is hiding. Here is a typical playing sequence (without the grid output):

Guess           Clue
5, 5            Go Northwest
2, 7            Go Northeast
3, 9            Go South
3, 8            You found Hurkle!

Begin by displaying Lirht:
                       NORTH
      --- --- --- --- --- --- --- --- --- ---
  10 |   |   |   |   |   |   |   |   |   |   |
      --- --- --- --- --- --- --- --- --- ---
   9 |   |   |   |   |   |   |   |   |   |   |
      --- --- --- --- --- --- --- --- --- ---
   8 |   |   |   |   |   |   |   |   |   |   |
      --- --- --- --- --- --- --- --- --- ---
   7 |   |   |   |   |   |   |   |   |   |   |
W    --- --- --- --- --- --- --- --- --- ---  E
E 6 |   |   |   |   |   |   |   |   |   |   | A
S    --- --- --- --- --- --- --- --- --- ---  S
T 5 |   |   |   |   |   |   |   |   |   |   | T
      --- --- --- --- --- --- --- --- --- ---
   4 |   |   |   |   |   |   |   |   |   |   |
      --- --- --- --- --- --- --- --- --- ---
   3 |   |   |   |   |   |   |   |   |   |   |
      --- --- --- --- --- --- --- --- --- ---
   2 |   |   |   |   |   |   |   |   |   |   |
      --- --- --- --- --- --- --- --- --- ---
   1 |   |   |   |   |   |   |   |   |   |   |
      --- --- --- --- --- --- --- --- --- ---
       1   2   3   4   5   6   7   8   9   10
                       SOUTH

Each time the player makes a guess, reprint Lirht with X's in the spots guessed. To make it a little easier, you don't need to include the directions (North, South, etc.)

Explanation / Answer

JAVA HURKLE: or this assignment, you will be creating a text-only version of a g