This is an asignment of our Java Training In this exercise I used following methods:
- Randomizer
- Control flow / conditionals with if statements
- Comparisons
Write a fantasy game character creator!
-
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 :)
- 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 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!
-----------------------------------------