Java game development jump it

Assignment Help Basic Computer Science
Reference no: EM13829605

Problem:

"Jump It" Game

The game "Jump It" consists of a board with n positive integers in a row, except for the first column, which always contains zero. These numbers represent the cost to enter each column. Here is a sample game board with n set to 6:

0   3   80   6   57   10

The objective of the game is to move from the first column to the last column with the lowest total cost. The number in each column represents the cost to enter that column. You always start the game in the first column and have two types of moves. You can either move to the adjacent column or jump over the adjacent column to land two columns over. The cost of a game is the sum of the costs of the visited columns.

In the board shown above, there are several ways to get to the end. Starting in the first column, our cost so far is 0. We could jump to 80, ten jump to 57, then move to 10 for a total cost of 80+57+10=147. However, a cheaper path would be to move to 3, jump to 6, then jump to 10, for a total cost of 3+6+10=19.

Write a recursive solution to this problem that computes the lowest cost of the game and outputs this value for an arbitrary large game board represented as an array. Your program does not have to output the actual sequence of jumps but only the lowest cost of this sequence. After making sure that your solution works on small arrays, test your solution on larger boards with larger values of n to get a feel for the scalability and efficiency of your solution.

Implement the game in a separate class Game. Write a driver that makes use of a Game object in a public class GameDriver that has the main method.

Additional Information:

This question is from Computer Science as well as it explains about developing the game called Jump It. The game is about moving from first column to last column with lowest total cost. This game requires to be developed using Java.

Reference no: EM13829605

Questions Cloud

Statement review makes it lawful for a man to kill a thief : Statement Review makes it lawful for a man to kill a thief
Writing java program which can develop anagrams : An anagram is a rearrangement of the letters of a word or phrase into a new word or phrase. Some of them can be quite amusing or apt. For example:
Class hierarchy to represent geometric figures : Design, build and test a class hierarchy to represent geometric figures including circles, triangles, squares, rectangles, polygons, and hexagons. Implement just minimum number of methods per each class to reflect a distinctive characteristic of a..
Statement review the dictum that truth always triumphs : Statement review the dictum that truth always triumphs
Java game development jump it : The game "Jump It" consists of a board with n positive integers in a row, except for the first column, which always contains zero. These numbers represent the cost to enter each column. Here is a sample game board with n set to 6:
Write an essay on copying of computer software : The problem is belongs to Sociology and the problem is describe about writing an essay on copying of computer software and its de-criminalization.
What are the internal rates of return for the projects : what are the internal rates of return for the following projects?
Polymorphic class hierarchy for sets and bags : Implement the following Set class. A set is a collection of items with no duplicates. The following class implements a set of integers.
What means do you use to develop supporting ideas : Is there a time of day when you're more effective? Do you prefer working in isolation or in the company of others? Are you more productive composing at a keyboard or with pen and paper?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Purchase a pre-built personal computer

Purchase a pre-built personal computer

  How is targeted advertising done wirelessly

How is targeted advertising done wirelessly

  Compare clock cycle times and execution times

Instead of a single cycle orgization we use multicycle organization where each instruction takes multiple cucles but only one instruction finishes before another is fetched. in this organization.

  Enterprise information systems

Enterprise Information Systems, Technologies, and InfrastructuresWrite a brief, 1 page paper that discusses the topic that you will do your research paper on.  The paper, at a minimum should address the topic that you have selected, which of the 5 fo..

  Enhanced home utility auditing program

The user should be able to do the following:Enter the cost per kilowatt-hour. Select from a list of home appliances which includes a > or >, among other appliances

  What term was a major issue during the process

What term was a major issue during the process of continuously dubbing media? Digitization cured this issue.

  Illustrate how to overload the operators

Use the class rectangletype to illustrate how to overload the operators

  What information does the data mining generate

What information does the data mining generate?

  Pi requests a unit of ri and a unit of r3

pi requests a unit of Ri and a unit of R3.

  Design a gui program

Design a GUI program

  Explain why the files are not the same size

If three text files contained in Assignment 4 Files.zip each contain the same information; however, the file sizes are not the same. Explain why the files are not the same size.

  What is the length of values defined for city column

What is the length of values defined for city column. Modify the length of "city" in the table "suppliers".

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd