A modular basketball analytics and game simulation engine built in C++ using object-oriented programming, dynamic memory management, linked lists, recursion, and file-based datasets.
This project simulates basketball gameplay events, tracks player movement data, analyzes possessions, and generates advanced scoring and foul reports using custom-built data structures and polymorphic event handling.
- Player statistics and scoring analysis
- Team scoring summaries
- Shooting percentage calculations
- Distance-based shot evaluation
- Possession efficiency tracking
- Real-time game event simulation
- Dynamic foul and free-throw system
- Recursive possession scoring reports
- Full game log generation
- File parsing using custom dataset loaders
- Player movement tracking
- Event-based gameplay reconstruction
- Inheritance and polymorphism
- Abstract base classes
- Dynamic memory allocation
- Linked lists
- Recursive algorithms
- Dynamic resizing arrays
- File I/O and parsing
- Modular software architecture
- C++
- Object-Oriented Programming (OOP)
- Dynamic Memory Management
- Linked Lists
- Recursion
- File I/O
- Makefile Build System
| Class | Responsibility |
|---|---|
Game |
Main simulation and analytics engine |
Player |
Stores player information |
PlayEvent |
Represents play-by-play events |
TrackingPoint |
Stores player tracking coordinates |
GameEvent |
Abstract base class for game events |
ShotEvent |
Handles scoring logic |
FoulEvent |
Handles foul and free-throw logic |
ReboundEvent |
Handles rebound events |
Used for:
- Play logs
- Player history tracking
Used for:
- Possession chains
Stores multiple event types through base-class pointers:
ShotEventFoulEventReboundEvent
via GameEvent*.
Shot values are dynamically calculated using shot distance:
| Distance | Points |
|---|---|
| 0-5 ft | 1 |
| 5-15 ft | 2 |
| 15-23 ft | 3 |
| 23-30 ft | 4 |
| 30+ ft | 5 |
1,Sarah Johnson,Guard,12
2,Maya Chen,Forward,230,1,2PT,MISS,0,0.5,11:45
1,3,REBOUND,OFF,0,3.2,11:420,1,38.2,30.7,0.0
1,2,37.7,25.6,0.0git clone https://github.com/Kathan472/Basketball-Analytics-System.gitcd Basketball-Analytics-Systemmake./programThis project strengthened my understanding of:
- Large-scale C++ application design
- Memory management using raw pointers
- Polymorphism and inheritance
- Recursive algorithms
- Simulation architecture
- File parsing systems
- Data structure implementation
- Modular software engineering practices
This project is licensed under the MIT License.


