Code Monkey home page Code Monkey logo

dnd-battle-tracker's Introduction

dnd-Battle-Tracker

With this application the Dungeon Master can manage the battles with all their aspects in your D&D sessions

dnd-battle-tracker's People

Contributors

liorkgow avatar

Watchers

 avatar

dnd-battle-tracker's Issues

(Frontend): Add a MidBattle Page to present the list of participating characters

This page should contain the following things:

  • List of participating characters (presented by the order of the initiative)
  • Start Battle button, which would turn into an End Battle button
  • Next Turn button
  • Marker of the character which is currently playing
  • Number of Current Round of the battle

Additional Features:

  • Add a new character mid battle -> by pressing a '+' button which would then present the form -> could be in a modal
  • Character taken damage -> button 'Hit' -> when clicked would reduce the amount of HP by an input provided by the user
  • "Top of the Round" -> special events that would occur in a random round -> could be random or in every round, could also be chosen by the DM. More info can be found on my notebook
  • Death Saves

(Frontend): Add CRUD Actions to the Participants

  • Create -> Uses the create Form, and the '+' or 'Add a new Character' button
  • Read -> Presents additional information about the Participant
  • Update -> Uses the same Create Form but with an 'Update' button, and the previous data is presented in the form
  • Delete -> Removes a character from the battle (can add an 'x' or a 'trash can' icons to activate this action)

Think about how to implement them

Configure React Testing Library

  • Install React Testing Library
  • Add a script to run tests
  • Make sure to create an example test to make sure everything is configured and is working correctly

(Frontend): Add a Form to fill in a character who is taking a part in the battle

  • Character Name (String)
  • Initiative (Integer)
  • Initiative Modifier (Integer)
  • Class (Hero / Adventurer / Enemy / Monster / Creature / Ally / NPC)
  • HP (Integer)
  • AC (Integer)

Optional:

  • Class
  • Picture (file- img)
  • Level (Int)
  • Skills / Abilities / Feats
  • Spells (different level spell slots, known spells)
  • Immunities
  • Resistances
  • Speed
  • Tools / Items
  • Could add an option to import from a JSON file

(Backend): Create an API Server Managing the Participants Data

  • Participants will be managed in an Object, where the key will be the id of the Participant and the value will be all the information of the Participant.

  • Add CRUD operations to the Participants:

  • (Participant ): Add Create Operation - creates a new Participant in the Participant Object: /participants + POST
    Receives: a Participant Object, validates it's legality, adds it to the Participant Object.
    Returns:

  • ID of the created Participant with status 201 (created) for a successful creation

  • 400 (bad request) in case it received a not valid Participant object

  • 500 (internal server error) in case something else went wrong inside the server

  • (Participant ): Add Read Operation - Returns the data of the Participant, whose id was provided in the request query params: /participants/:id + GET
    Receives: a Participant id, validates it's legality and returns the Participant data in the body of the response
    Returns:

  • Participant's data of the requested Participant with status 200 (OK) for a valid Participant id, who is present in the Participant Object

  • 404 (not found) in case it received an id of a Participant which is not present in the Participant Object

  • 500 (internal server error) in case something else went wrong inside the server

  • (Participant ): Add Update Operation - Updates the data of the Participant, whose id was provided in the query params: /participants/:id + PUT
    Receives: a Participant id, validates it's legality and updates the Participant data in the body of the response
    Returns:

  • Participant's updated data of the requested Participant with status 200 (OK) for a valid Participant id, who is present in the Participant Object & the Participant was updated successfully

  • 404 (not found) in case it received an id of a Participant who is not present in the Participant Object

  • 500 (internal server error) in case something else went wrong inside the server

  • (Participant ): Add Delete Operation - Deletes the Participant from the Participant Object, whose id was provided in the query params: /participants/:id + DELETE
    Receives: a Participant id, validates it's legality and deletes the Participant from the Participants Object
    Returns:

  • status code of 200 (OK) for a valid Participant id, who is present in the Participant Object & the Participant was deleted successfully

  • 404 (not found) in case it received an id of a Participant who is not present in the Participant Object

  • 500 (internal server error) in case something else went wrong inside the server

  • Advanced When there is an active battle, the Participants will be also handled in an Array where the order of them inside the Array is determined by the initiative rolled by the players. When a new battle begins, the server will get an Array / Object holding the Participant id and his/her initiative. Then the server will create the Array and manage the active battle only within the Array. When the battle ends, the server will update the Participant Object with the updated state of the Participants (HP, Spell Slots, Items, etc..)

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.