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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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