feat: core sepration, observer added

This commit is contained in:
shahdlala66
2026-03-29 20:47:58 +02:00
parent 7d60c4bb29
commit d2f294294f
15 changed files with 738 additions and 178 deletions
+41
View File
@@ -0,0 +1,41 @@
# 🔒 CODE FREEZE NOTICE
## Date: March 29, 2026
## Duration: Core Separation Refactor
### Reason
Implementing Command Pattern and Observer Pattern to decouple UI and logic interfaces.
### Scope
This refactor will:
1. Extract TUI code from `core` module into standalone UI module
2. Implement Command Pattern for all user interactions
3. Implement Observer Pattern for state change notifications
4. Make `core` completely UI-agnostic
5. Enable multiple simultaneous UIs (TUI + future ScalaFX GUI)
### Module Structure (Target)
```
modules/
core/ # Pure game logic, Command, Observer traits, CommandInvoker
api/ # Data models (unchanged)
ui/ # TUI and GUI implementations (both depend only on core)
```
### Expected Impact
- All regression tests must pass
- Build must succeed with new module structure
- Core contains zero UI references
- TUI and potential GUI can run independently or simultaneously
### Blocked Changes
Do not:
- Add new features to `core`
- Modify `core` API before Message & Observer traits are implemented
- Create direct dependencies between UI modules
- Add UI code to `core`
Keep developing in separate branches until refactor is complete.
---
Status: **IN PROGRESS** ✏️