A simple RPG Battle simulator written in Typescript.
To run the repo after cloning, simply:
npm start
Before working on the code for the application, I made a few rough designs using Figma. These can be viewed here.
The CSS is done using SCSS + BEM.
I have used a React Reducer (from useReducer
) hosted in a React Context
(createContext
) to supply the data for the app.
A Redux style flow of actions, middleware, and a reducer are built up in the
model directory. The BattleContext
wraps the apps UI
components, which can then access state and actions through the two custom
hooks useBattle
and useBattleActions
provided (see
context.tsx).