Skip to content

RobinHagolani/RPG-Character-Roller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPG-Character-Roller

This is an asignment of our Java Training In this exercise I used following methods:

  • Randomizer
  • Control flow / conditionals with if statements
  • Comparisons

Screenshot of code

The Assignment:

Write a fantasy game character creator!

Preparation

  • Option 1

    • Create a public repository on your GitHub profile
    • Clone it and add these instructions as README.md
  • Option 2:

    • Fork this repository and clone your fork of this
  • Make sure .class files are not included in git :)

Requirements

  • Create a new class called Creator.java
  • Make Creator take in the character name as an argument
  • Create a role playing game character
    • A character will randomly be a Warrior, Wizard or Potato
    • Each character has stats: Health, Strength and Magic
    • Each stat is random, between 2 and 12
    • Warriors will have triple Strength
    • Wizards will have triple Magic
    • Potatoes will have triple Health
  • Example of desired program output below

Example

Example of desired program output below:

$ javac Creator.java && java Creator Veera
-----------------------------------------
Welcome to the character generator!
Veera is.... a Wizard!

        Strength: 6
        Magic: 18
        Health: 11

Happy adventuring!
-----------------------------------------

About

This is an asignment of our Java Training

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages