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 #89

Open giovabattelli opened 2 weeks ago

trysherpa[bot] commented 2 weeks 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 extending the battleship board size from a range of 6-15 cells to a new range of 6-25 cells. This will involve modifying the relevant parts of the codebase to accept and handle the new dimensions correctly.

Relevant Files

Changes Required

1. AbstractPlayer.java

2. BattleshipSalvo.java

3. Board.java

4. Player.java

Summary

To implement the requested change, you will need to update the height and width constraints in the AbstractPlayer and BattleshipSalvo classes, ensuring that the new limits are appropriately enforced in the game logic. After making these adjustments, verify that the game behaves correctly with the new board sizes, including any user input validation and ship placement logic.