Generate a random number for the user and for the monster

Assignment Help Basic Computer Science
Reference no: EM13308487

I have been trying for days to figure out how to get this working, but have yet to succeed in doing so. Can some please help me with this?

Repeatable steps start here

Let the player indicate his level, the monster level and any enhancements on his weapon or spells.

Generate a random number for the user and for the monster as an integer number between 1 and 500.

Monsters can be up to 5 levels above or below the player. For every level the monster is below the player level, add 10 from the player's roll. And for every level the monster is above the player's level, add 5 to the monster's roll.

Players can have enhanced weapons and spells. For an enhanced weapon, add 10 to the player roll. For an enhanced spell add 5 to player roll.

If after evaluation there is a tie re-evaluate with two new random numbers, but the player loses his weapon enhancement in the subsequent roll. The level differential remains in effect and the spell enhancement remains in place.

Display each encounter's result, including monster level, player level, enhancements, monster score and player's modified score.

Repeatable steps should end here.

To quit have the player enter a 0 for player level. That is, repeat the above steps until the user says that he is finished by entering a 0 for the next player number. Note you should only have to seed the random number generator once.

When the user indicates that he is finished, display the results, including the number of monsters faced, number of monsters killed and the subsequent kill ratio (number of kills/ number of encounters).

 

Reference no: EM13308487

Questions Cloud

Critical analysis of a project business case : Critical analysis of a project business case and Critical analysis of a Project Management Plan (PMP)
Explain why your technique is lossless and not lossy : Devise a way to compress the following list of last names using a lossless technique. Describe your method and show the compressed list. Explain why your technique is lossless and not lossy.
What is the red-shifted wavelength of hydrogen alpha light : The hydrogen alpha emission spectra has a 658.28 nanometer wavelength. What is the red-shifted wavelength of hydrogen alpha light from the bootes galaxy cluster
Natural law and the fiduciary duties of business managers : Joseph Johnston argues, in his article, Natural Law and the Fiduciary Duties of Business Managers that..."Simply put, stakeholder theory sounds good in social theory but will not work in practice."
Generate a random number for the user and for the monster : I have been trying for days to figure out how to get this working, but have yet to succeed in doing so. Can some please help me with this?
Define calculations and format the table : internship at Mountain View Realty, a real estate firm that focuses in the North Utah County area. The previous intern developed a spreadsheet listing houses listed and sold during the last several months. She included addresses, location, list pr..
What would be reading on barometer containing benzene : What would be the reading on a barometer containing Benzene at 20 degrees Celsius at a time when the atmospheric pressure was equivalent to 12.3 m of water
Create two arrays with 5 elements each : Create two arrays with 5 elements each: one will hold Strings and the second will hold integers.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Which of the following baseband technologies

The IEEE 802.3u standard identifies which of the following baseband technologies

  Explain the differences between server-side and client

Explain the differences between server-side and client - side scripting languages. Please provide at least 3 advantages and disadvantages of each. Please cite your sources if needed.

  Describe the graphical coordinate system in java

How do you specify a particular color to be used as fill when using the Graphics class?

  Responsibilities of job when designing digital portfolio

Do you think that your digital portfolio should depend on the job, title, or industry you are planning or working on getting into? Do task and responsibilities of a specific job matter when designing your digital portfolio?

  Driving force causing this evolution

Discuss the evolution of client-server computing from file server to multilayer applications to Web-based applications. What has been the driving force causing this evolution? Where do you think network computing will be in the next five years? Ten y..

  Find optimal production amounts using graphical method

The daily demand for solution A lies between 30 and 150 units, and that for solution B between 40 and 200 units. Find the optimal production amounts of A and B using the Graphical Method.

  What is the swap space amount for the bash command

If using a long listing and no process modifiers, what is the swap space amount for the bash command?

  There are four conditions that are necessary

There are four conditions that are necessary for a deadlock to occur. Give an example to show that these conditions are not sufficient for a resource deadlock to occur. When are these conditions sufficient for a resource deadlock to occur? Explain..

  Data mining and privacy

Data Mining and Privacy

  Write a program to display a simplified bill

Suppose automobile repair customers are billed at the rate of $35 per hour for labor. Also, suppose costs for parts and supplies are subject to a 5% sales tax.

  Create the data model segment for business rules

The FlyRight Aircraft Maintenance (FRAM) division of FlyRight Company (FRC) does all maintenance for FRC's aircraft. Create the data model segment which reflects the following business rules.

  Implement a class for complete binary trees

You should have only one member function that adds a new node(since there is only one place where a node may be added, and one member function that removes the last node of the tree.

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