ITS 3105 South University The Game Hurkle Project This week’s project is based on the game “Hurkle”. There are many variations of this game, and the versio

ITS 3105 South University The Game Hurkle Project This week’s project is based on the game “Hurkle”. There are many variations of this game, and the version you will work on for your project is a one-dimensional version of it. The Hurkle is an imaginary creature that hides somewhere in a one-dimensional 1×10 integer game-space. Each time the game is run, the program places the Hurkle at a random position (0 through 10) in the game-and the player has a maximum of three (3) guesses to guess the Hurkle s location. The Hurkle does not move during the game. If the player finds the Hurkle, the program reports success and ends. If the player does not find the Hurkle the program gives a hint about what direction to move to find the Hurkle. There are two possible hints: right, or left.

The given version of the program is a console-based version (meaning the inputs and outputs happen on the console display). Run this code for the game Hurkle to see how it executes. It works well in the console but your job is to convert it for running in SWING with more graphical feedback for the user.You job is to experiment with the given code, and then adapt it by incorporating SWING features, such that the inputs and outputs will be more GUI-oriented, rather than console oriented. We’ve used SWING features in several programs already (in the lectures) and earlier project assignments, so you may want to review your textbook reading and the code examples in the week that use SWING.

Don't use plagiarized sources. Get Your Custom Essay on
ITS 3105 South University The Game Hurkle Project This week’s project is based on the game “Hurkle”. There are many variations of this game, and the versio
For $10/Page 0nly
Order Essay

import java.util.Random;

import java.util.Scanner;

publicclass Hurkle

{

publicstaticvoid main(String[] args) {

// TODO Auto-generated method stub

// gets user input for the keyboard

Scanner input = new Scanner(System.in);

//Gets a random number between 0 and 1

Random ran = newRandom();

//variable to hold the users’ guess

int usersAnswer;

finalint LIMIT = 10;

//variable to hold the system random number

int rGuess;

rGuess = ran.nextInt(LIMIT);

// Here we are creating an array of one character strings into a String variable named ‘display’

String[] display ={“0″,”1″,”2″,”3″,”4″,”5″,”6″,”7″,”8″,”9″,”10”};

System.out.println(“You get 3 tries to win!”);

// Tell the user how many tries they will get

for(int tries = 0; tries “;

// replace the user guessed number with feedback: greater than, this is saving the feedback

} else{ // so it doesn’t get lost for the user

display[usersAnswer ] = “

admin

Recent Posts

Economic Debate #3- Progressive Income Tax – The Homework Helper

Economic Debate- Progressive Income Tax For this Economic Debate, we are going to discuss the…

2 years ago

MKT 6120 – Marketing Management – Davis Learning Engagement #7

TOPIC: Going Global Discussion Thread 1 (initial post due Wednesday for full credit) Please note:…

4 years ago

jvjvjhvjhvhjvj

Assignment Topic This week will culminate in the creation of a narrated PowerPoint to create…

4 years ago

Students are supposed to select a technological organization of their choice.

The Assignment must be submitted on Blackboard (WORD format only) via allocated folder. Assignments submitted…

4 years ago

Increases the risk of wildfires

you need to post your 2-page information flier to share with your Final Project Group.…

4 years ago

Statistics for Technology management

discussion: Discuss the methods used at your company to measure and ensure quality products and…

4 years ago