Git Product home page Git Product logo

magical-arena-game's Introduction

๐Ÿง™โ€โ™‚๏ธโœจ Magical Arena โœจ๐Ÿง™โ€โ™€๏ธ

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! ๐ŸŽฒโš”๏ธ

๐Ÿš€ Installation

To install the game, run:

npm install

๐ŸŽฎ Usage

To start the game, run:

npm start

Follow the on-screen instructions to begin your magical duel! ๐Ÿง™โ€โ™‚๏ธ๐Ÿง™โ€โ™€๏ธ

๐Ÿงช Testing

To run the unit tests, use:

npm test

๐Ÿ“œ Game Rules

  • 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. ๐Ÿ’ฅ

๐Ÿ› ๏ธ Implementation Details

  • 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! ๐ŸŽ‰

magical-arena-game's People

Contributors

suraj1849 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.