Immediate Code Cleanup

This commit is contained in:
2025-08-17 10:58:06 +02:00
parent 56bdc61cc4
commit e591aaba45
8 changed files with 679 additions and 22 deletions

View File

@ -31,18 +31,19 @@
- Working refactored application (`tetris_refactored.exe`) alongside original
- Proper error handling and logging throughout
### Immediate Code Cleanup
- [ ] Remove global variables from main.cpp
- [ ] Move static variables to appropriate managers
- [ ] Remove global texture and font variables
- [ ] Eliminate global state flags
- [ ] Clean up static function declarations
### Immediate Code Cleanup ✅ **COMPLETED**
- [ ] Extract constants to configuration
- [ ] Create Config namespace with all constants
- [ ] Remove magic numbers from main.cpp
- [ ] Define window size constants
- [ ] Set up gameplay timing constants
- [x] Remove global variables from main.cpp
- [x] Move static variables to appropriate managers (GlobalState)
- [x] Remove global texture and font variables (AssetManager)
- [x] Eliminate global state flags (GlobalState singleton)
- [x] Clean up static function declarations
- [x] Extract constants to configuration
- [x] Create Config namespace with all constants
- [x] Remove magic numbers from main.cpp
- [x] Define window size constants
- [x] Set up gameplay timing constants
## 🔧 Phase 2: Core Systems (Week 3-4) - HIGH PRIORITY ✅ **COMPLETED**