Welcome to Magical Arena, where two players engage in a thrilling battle until one emerges victorious! Roll the dice, strategize your attacks, and may the best mage win! ๐ฒโ๏ธ
To install the game, run:
npm install
To start the game, run:
npm start
Follow the on-screen instructions to begin your magical duel! ๐งโโ๏ธ๐งโโ๏ธ
To run the unit tests, use:
npm test
- Attributes: Each player has three attributes - Health, Strength, and Attack, all represented by positive integers.
- Death: A player dies when their health reaches zero. โฐ๏ธ
- Turns: Players attack in turns, rolling a six-sided die to determine the outcome of their attacks and defenses. ๐ฒ
- Attack Calculation: The attacker's attack value is multiplied by the outcome of their attacking die roll to calculate the damage.
- Defense Calculation: The defender's strength value is multiplied by the outcome of their defending die roll to calculate the damage defended.
- Damage: The defender's health is reduced by the excess damage after defending. ๐ฅ
- Language: The project is implemented in Node.js.
- Player Class: Defines a player with attributes and methods for attacking and defending.
- Game Class: Manages the game flow, including starting the game and declaring a winner.
๐ Enjoy your magical duel in the arena! May the best mage win! ๐