Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tanner-davison/battle-simulation_by_tanner_davison
simulates a battle between a player and an enemy, where the player can choose different attack strategies to defeat the enemy. The game includes features like tracking health, stamina, and hits allowed, and it provides a summary of the battle results.
https://github.com/tanner-davison/battle-simulation_by_tanner_davison
Last synced: 14 days ago
JSON representation
simulates a battle between a player and an enemy, where the player can choose different attack strategies to defeat the enemy. The game includes features like tracking health, stamina, and hits allowed, and it provides a summary of the battle results.
- Host: GitHub
- URL: https://github.com/tanner-davison/battle-simulation_by_tanner_davison
- Owner: Tanner-Davison
- Created: 2024-06-29T01:29:54.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-09-03T05:41:57.000Z (4 months ago)
- Last Synced: 2024-10-22T14:37:11.811Z (2 months ago)
- Language: Makefile
- Homepage:
- Size: 176 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Character Battle Simulation
This C++ project simulates a battle between a player and an enemy, where the player can choose different attack strategies to defeat the enemy. The game includes features like tracking health, stamina, and hits allowed, and it provides a summary of the battle results.
## Features
- **Battle Simulation:** Players can choose from multiple attack types, each with different stamina costs and effects on the enemy.
- **Game Results:** The program provides feedback on the battle outcome based on the player's and enemy's health.
- **Player and Enemy Status Tracking:** Keep track of health, stamina, and hits allowed for both the player and the enemy.
- **Array Operations:** The project includes examples of working with 2D arrays, including summing elements in rows and columns.## Code Overview
### Main Functionalities
1. **Battle Logic:**
- `gameResults(int health, int enemyHealth, int stamina)`: Determines the outcome of the battle based on the player's and enemy's remaining health.2. **Battle Loop:**
- Allows the player to repeatedly choose attack strategies until the battle is over.3. **Array Operations:**
- Includes a 2D array example to demonstrate array operations such as printing elements and summing columns.### Custom Modules
- **Character Functions:** Located in `Character/CharacterFuncs.h`, handles player-related actions and statuses.
- **Custom Math Functions:** Located in `Math/customMath.h`, includes custom mathematical operations like checking equality.
- **Entity Functions:** Located in `entity/EntityFunctions.h`, manages enemy-related actions and statuses.## Dependencies
- **Standard C++ Library:** Utilized for basic I/O operations and standard functions.
- **fmt Library:** Used for advanced string formatting (if included in your actual implementation).
- **Windows API:** Utilized for any system-specific operations (e.g., setting console color or other Windows-specific functionalities).## Setup
1. Clone the repository:
```bash
git clone https://github.com/Tanner-Davison/Battle-Simulation_by_Tanner_Davison.git
```2. Compile the code using a C++ compiler.
3. Run the executable to start the battle simulation.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Contact
For any questions or feedback, feel free to reach out at [email protected].