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. #93

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 requires modifying the Battleship game to support a board size of 25 cells, expanding the current range from 6-15 cells to 6-25 cells. This change will involve updating the relevant code sections to accommodate the new board dimensions.

Relevant Files to Edit

Detailed Guidance on Changes

1. AbstractPlayer.java

2. BattleshipSalvo.java

3. Player.java

4. Board.java

Summary of the Approach

To implement the support for a battleship board of size 25 cells, you will need to update the relevant files by modifying the constraints for height and width in both the AbstractPlayer and BattleshipSalvo classes, while also ensuring that the Player interface and Board class can accommodate the new dimensions. Make sure to test the changes thoroughly to confirm that the game behaves correctly with the updated board sizes.