giovabattelli / terminal-battleship

Play a game of battleship (with modified game rules) against a basic AI in the terminal.
0 stars 0 forks source link

Add support for a battleship board of size 25 cells; instead of board size being between 6-15, it can be between 6-25 cells. #94

Open giovabattelli opened 1 month ago

trysherpa[bot] commented 1 month ago

Please note, Sherpa may occasionally provide incomplete or inaccurate information. Always verify critical details and double-check suggested changes before implementation.

Summary of the Problem

The issue at hand is to extend the support for the battleship board size from the current range of 6-15 cells to a new range of 6-25 cells. This requires modifications in several parts of the codebase to accommodate the new board size.

Relevant Files to Edit

Guidance on Changes Required

1. AbstractPlayer.java

2. BattleshipSalvo.java

3. Board.java

4. Player.java

Summary of the Approach

To implement the requested changes, you will need to update the relevant methods across the specified files to accommodate a board size of 6-25 cells. Focus on modifying the validation logic in both the AbstractPlayer and BattleshipSalvo classes to ensure that the new size constraints are enforced. After making these changes, thoroughly test the game to ensure that all components interact correctly with the updated board size.