Chance to teleport to another cell directly

Assignment Help Other Subject
Reference no: EM132680678

DiceGame

Instructions to Students

1. This assignment is an individual assignment and should be done on you own only. Plagiarism will be treated seriously. Any submitted assignment is found that involved wholly or partly in plagiarism (no matter the assignments are from the original authors or from the plagiarists) will be scored Zero mark and the students involved will be received discipline penalty set by the institute accordingly.

2. Grading of your programs will be based on correctness, quality, style and efficiency.

3. Late submission will NOT be accepted.

4. Each student may be arranged to conduct an interview with your lecturer to explain some parts of your program code and answer some questions. Marks will be deducted if you cannot explain your code well.

5. A non-compliable java program will results in NO marks.

Assignment Specification

You are asked to write a Dice Game using Java.

Rule of the game

1. When the program runs, there is a track with length 71 cells created for both the Player and CPU.
2. The first cell is indexed as 0 and the last step is indexed as 70.
3. Both the Player1 and CPU start at position 0.
4. Player 1 and CPU take turns to throw the dice, range from 1-6. Player1 always goes first.
5. Player1 / CPU go forward base on the number of rolled steps.
6. Whoever came first to cell 70 wins the game.

Feature - Teleport

1. Some cells on the track are given a chance to teleport to another cell directly. For example, if player step on cell 4, it will be teleported to cell 68.
2. The teleport graph is stored in an integer array with 71 elements.
static int[] teleport = {-1, -1, -1, -1, 68, -1, -1, -1, -1, -1,

-1, -1, -1, 40, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 38, -1, -1,
-1, -1, 2, -1, -1, 63, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 29 - 1, -1, -1,
-1, -1, -1, -1, -1, -1, 53, -1, -1, -1,
65, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1};

3. Copy the above array to your program code.
4. On the track, if there is a teleport chance moving forward, it is shown as ">", for moving backward, it is shown as "<".
5. Negative one (-1) in the array means there is no teleport chance on that cell.
6. You track should be like this at the very beginning of the game.
7. DO NOT hard code the track appearance, you should do it in a programmatic way. You should assume the developer may modify the track JUST BY modifying the teleport array.

Attachment:- DiceGame.rar

Reference no: EM132680678

Questions Cloud

Calculate the non-eligible portion of the retiring allowance : Michelle joined her company's pension plan in 1986 and was fully vested on termination of employment. Calculate the non-eligible portion of retiring allowance
Difference between prokaryotic and eukaryotic cells : 1. Is there a correlation between cheek cell length and height? In other words, do larger people have larger cells?
Explain the strategic operational plan proposal : Your first task is to post your outline of the Strategic Operational Plan Proposal (SOPP) to the discussion area so that other students are able to review.
Create income statement and statement of owner equity : Steady Answering Service Trial Balance, Make an income statement, Statement of Owner's Equity and a balance sheet for the month ended December 31, 2020
Chance to teleport to another cell directly : Some cells on the track are given a chance to teleport to another cell directly. For example, if player step on cell 4, it will be teleported to cell 68
Stages of meiosis : Though the stages of meiosis have the same names as the stages of mitosis, they exhibit fundamental differences. What are the 2 main differences between the two
Discuss the importance of ethics : Examine a case that occurred within the last 5 years where the suspect accepted a plea bargain. Provide an overview of the case while reviewing.
Orientation of homologous chromosomes : Explain how the orientation of homologous chromosomes during metaphase I of meiosis contributes to greater variation in gametes.
Calculate Ursula net federal taxable income : Ursula also has registered pension plan contributions of $20.00 deducted from each pay. Calculate Ursula's net federal taxable income

Reviews

Write a Review

Other Subject Questions & Answers

  Describe how you can know if a theory is valid

Using concepts from the assigned readings, define what a theory is. Describe how you can know if a theory is valid. Offer one example of how a personal belief.

  Explain the basic teachings and moral aspects of buddhism

Write a 700- to 1,050-word paper that addresses the following: Explain the basic teachings and moral aspects of Buddhism.

  Discuss the effective use of technology and creativity

Discuss the Effective use of technology and creativity. You will write the information on the discussion board and attach the brochure to it.

  Develop your own definition of global citizenship

After reading the article by Reysen and Katzarska-Miller, explain why there has been disagreement between theorists about the definition of global citizenship and develop your own definition of global citizenship.

  Briefly problems related to treating viral infections

Describe the characteristics of viruses responsible for respiratory viral infections

  What research gap is the article addressing

What research gap is the article addressing? What strands of previous and current research does this article use to create a rationale for its research question

  How you prepare professionally to work in functional area

How could you prepare yourself professionally to work in this functional area or unit? How could you continue to develop professionally in this area?

  Clinical reflection on the patient and dying process

Group Clinical Supervision Reflection Assignment - The assignment is to reflect on the patient and the dying process

  Describe how you would organize the layout for a classroom

Assume the role of a director and apply these principles toward the design of the learning space at the child development center you manage.

  How does your current company utilize each of the strategies

How does your current company utilize each of these strategies? Please be specific in your examples, and include whether or not you feel they are effective.

  What impact do the laws have on ethical standards

Create a 2-3 page paper that explains your viewpoint on the Benefits of Regulatory Agencies providing Health Care Services or the Issues with Regulatory.

  Explain the history of the medical education system

Explain the history of the medical education system leading up to the creation of the Flexner Report - Explain how the Flexner Report has contributed to medical education reform.

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