Implement CommandZoneLogic - the card data management layer for zones.
This layer handles card insertion, removal, and ordering independently
of Qt graphics rendering.
Key components:
- CommandZoneLogic: manages card data within a zone
- AddCardAlgorithm: generic insertion algorithm for ordered zones
- CardZoneLogic modifications: integrate with existing zone hierarchy
Design decisions:
- Separation of data logic from graphics enables unit testing
- addCardImpl uses a stable insertion algorithm for consistent ordering
- Mock card items enable testing without Qt graphics dependencies
Test coverage verifies card insertion behavior across edge cases.
Implement CommandZoneState - a pure C++ state machine managing zone
visibility transitions (Hidden, Revealed, Peeking states).
The state machine is intentionally decoupled from Qt graphics:
- Pure logic with no Qt dependencies in the state class
- Testable in isolation without a GUI
- Clear state transition table with StateChangeResult outcomes
Test coverage verifies:
- Initial state is Hidden
- Valid transitions: Hidden->Revealed, Hidden->Peeking, etc.
- Invalid transitions return NoChange
- Peek timeout triggers return to previous state
This establishes the foundation for command zone visibility management
while keeping graphics concerns separate.