Simulates a number of fights for a list of units then displays graphs with the results
Navigate to backend directory:
cd backend
Setup your virtual environment:
python -m venv .venv
then activate it:
source .venv/bin/activate
install the necessary packages 📦
pip install -e .
run, for backend testing purposes & CLI: 🚀
python main.py
to start the backend:
uvicorn main:app --reload
This will start the FastAPI dev server at http://localhost:8000. You can also visit http://localhost:8000/docs to try the automatically generated API interactively.
Install node and npm
- Download and install from https://nodejs.org
- Verify installation:
node -v
npm -v
Install Dependencies
cd frontend/
npm install
Start the Development Server
cd frontend/
npm run dev
This will start the Vite dev server. Open your browser and navigate to http://localhost:5173 to view the app.
The project uses the standard Vite + React + TypeScript setup. Key folders:
src/
– Main source codesrc/pages/
– Page componentssrc/components/
– Reusable UI componentssrc/assets/
– Static assets (images, fonts, etc.)src/hooks/
– React hooks to handle state-based changessrc/styles/
– css files
You can add unit profiles in backend/data.
To add a unit to the simulation, insert it in the 'units' array in the main.py file
"id": "companion"
: Flag the weapon as "companion""id": "crit_auto_wound"
: Flag the weapon as "Crit Auto Wound""id": "crit_mortal"
: Flag the weapon as "Crit Mortal""id": "crit_2_hits"
: Flag the weapon as "Crit 2 Hits""id": "crit_5+"
: Flag the weapon as "Crit 5+""id": "add_X", "condition": Y, , "value": Z
: If condition Y (charged/...) is satified, add Z to value X (attacks, rend, hit, wound)