Backend Architecture¶
Tatuy high-level code depends on backend contracts rather than concrete Pygame classes.
The backend acts as a composition root for focused capabilities.
Rules:
- depend on protocols/contracts rather than concrete implementations
- keep platform-specific types contained
- depend on the smallest capability required
- keep capabilities focused
- allow implementation-specific ugliness inside the implementation boundary
The backend boundary is allowed to know exactly how Pygame works.
The rest of the engine should not have to.