A command-line role-playing game (RPG) in which the user battles a series of enemies whose health and stats can be sustained by taking a potion. The game creates new objects using JavaScript constructor functions, and implements basic code tests using the Jest framework.
You must first clone this repository onto your local machine (How to Clone a repository), cd into the root folder of jest-another-rpg and run npm install
.
While in the root folder run node app.js
to start the application.
You will be prompted to enter your player name. You'll be presented your player stats and the enemy you will battle.
From there you have the option between attacking the enemy and using a potion for each move.
If you defeat the enemy, you will be given a new potion. There are three types of potions health, agility, and strength. You will also be presented your new stats and a new enemy to battle in the next round.
Keep fighting until you beat all three rounds or you are defeated.
- Javascript
- Using Object-oriented programming (OOP) and Jest Framework
Michelle Asuamah
If you would like to contact me you can reach me at michey.asmah21@gmail.com.