[US-01] Setting ships somewhere on the board
Description
Implements ship placement functionality for the Battleship game as described in issue #1.
Changes
- Created core model classes: Board, Ship, Coordinate, Direction, Player, Game
- Implemented ship placement validation with boundary checks and overlap prevention
- Added comprehensive test coverage for all ship placement scenarios
- Followed the planned layered architecture with model, service, and view packages
Features Implemented
- 10x10 game board for each player
- Standard fleet: Carrier (5), Battleship (4), Cruiser (3), Submarine (3), Destroyer (2)
- Ship placement validation: boundaries, overlaps, straight placement only
- Error handling for invalid placements
- Board state management and ship tracking
Acceptance Criteria Verified
- Implemented boundary validation in
Board.validateShipPlacement() - Tested in
BoardTest.testPlaceShipOutsideBoundariesHorizontal()andBoardTest.testPlaceShipOutsideBoundariesVertical()
- Implemented overlap detection in
Board.validateShipPlacement() - Tested in
BoardTest.testPlaceShipOverlap()
- Implemented
Board.allShipsPlaced()method - Standard fleet management with
Board.getStandardFleet()
Technical Details
- Java 21 with Maven build system
- JUnit 5 testing framework
- Layered architecture following MVC pattern
- Comprehensive test coverage with 70%+ code coverage requirement
Closes #1