Giter Club home page Giter Club logo

jay1194 / jest-another-rpg Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 60 KB

This command-line RPG game immerses players in turn-based battles against enemies, leveraging Object-Oriented Programming (OOP) principles and constructors for development. It’s built using Test-Driven Development (TDD) methodologies to ensure robust and reliable game mechanics.

License: Apache License 2.0

JavaScript 100.00%
constructors inquirer jest-tests nodejs object-oriented-programming test-driven-development javascript

jest-another-rpg's Introduction

jest-another-RPG

A text-based RPG game where the player engages in a turn-based battle with an enemy in the command line interface. Developed using constructors, following Test-Driven Development (TDD) principles, and applying Object-Oriented Programming (OOP) concepts.

Overview

The CLI RPG Game is a console application that leverages constructors for player and enemy objects, incorporates tests developed through TDD, and follows OOP principles to structure the code.

Features

  • Turn-based battle system.
  • Player can choose to attack or use a health potion.
  • Dynamic health and damage calculations.

Getting Started

Prerequisites

  • Node.js installed
  • Inquirer npm package

Installation

  1. Clone the repository
    git clone https://github.com/jay1194/jest-anouther-RPG.git
  2. Install
    npm install

Usage

  1. Open a terminal and navigate to the project directory.
  2. Run the application
    node index.js
    

Technologies Used

  • Node.js
  • Inquirer npm package
  • Jest for testing
  • Node.js
  • Constructors
  • Test-Driven Development (TDD)
  • Object-Oriented Programming (OOP)

Contributing

  • Contributions are welcome! Feel free to open issues or submit pull requests.

License

badge
This application is covered by the MIT license.

jest-another-rpg's People

Contributors

jay1194 avatar

Watchers

 avatar

jest-another-rpg's Issues

Consolidate the code

  • Refactor and improve the code after all tests pass
  • Remove areas of code duplication

Create a Game object, Which will be responsible for the game logic. It will be used to keep track of whose turn it is, prompt user for input, and check if the game has been won.

  • All game logic is encompassed by a Game() constructor function.

A Game object has the following properties:

  • roundNumber
  • isPlayerTurn
  • enemies
  • currentEnemy
  • player

A Game object has the following methods:

  • initializingGame()
  • battle()
  • checkEndOfBattle()
  • startNewBattle()
  • Consolidate the code. We don't yet know exactly what this step entails, but we do know that we'll need to refactor our code after the tests pass, so we'll create this issue as a placeholder.

Create a Potion object

  • Create tests for the Potion object
  • The Potion object will be used to give the player stat boosts.
  • If no stat is provided, the stat should be randomly selected.

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.