Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kartmaan/fight-simulator
Turn-based combat simulation in Rust
https://github.com/kartmaan/fight-simulator
fight game hashmap lazy-static rust rust-lang simualtion terminal-game turn-based turn-based-combat
Last synced: 29 days ago
JSON representation
Turn-based combat simulation in Rust
- Host: GitHub
- URL: https://github.com/kartmaan/fight-simulator
- Owner: Kartmaan
- Created: 2024-10-31T17:55:52.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-11-17T16:05:16.000Z (about 1 month ago)
- Last Synced: 2024-11-17T17:24:27.377Z (about 1 month ago)
- Topics: fight, game, hashmap, lazy-static, rust, rust-lang, simualtion, terminal-game, turn-based, turn-based-combat
- Language: Jupyter Notebook
- Homepage:
- Size: 1.57 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# fight-simulator
This program simulates a turn-based fight between two entities, each with its own attack and defense characteristics.This project was carried out as part of a **personal training** in Rust. The main goal was to familiarize oneself with as many concepts of the language as possible :
* `structs`
* `enum`
* `trait`
* `HashMap`
* `lazy_static`
* `rand`
* Generic types
* ...## Features
* Bestiary of mobs with their own characteristics that can be easily called to put them into fights
* Player with different classes (warrior, archer) each directly influencing their characteristics with bonuses and penalties.
* Simulation of a turn-based fight between the player and a mob or between two players or two mobs.
* Calculation of damage based on the attributes of the player and the mob like armor value, HP, critical damage probability, etc.
* Stylized display of information each round until one of the fighters wins
* A Jupyter notebook to simulate different attack and defense configurations and judge performance graphically.## Screenshots
Fight between a Warrior (Lost) and an Archer (Duriel) :![cap](https://github.com/user-attachments/assets/522201b3-faac-434b-9940-9ce91c03ab4b)