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

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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