[US-02] Alternating shooting with feedback
Implements turn-based shooting system with hit/miss feedback and duplicate shot prevention.
Changes
- Added turn-based shooting logic with alternating players
- Implemented shot validation and duplicate shot prevention
- Added hit/miss feedback system
- Created board display for both own and opponent views
- Added game state management and win condition detection
Acceptance Criteria Met
-
✅ When firing at A1 for the first time, a message appears showing hit or miss, and that field becomes marked -
✅ When the same field is targeted again, the shot does not go through, and the next player acts -
✅ After one shot cycle finishes, the control changes so that only the other player can continue
Technical Implementation
- Core entities: Game, Player, Board, Coordinate, Ship, ShotResult
- MVC pattern with clear separation of model, view, and controller
- Comprehensive error handling for invalid coordinates and duplicate shots
- Proper game state management with setup, playing, and finished states
Closes #2
Edited by Ivan Esau