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 max of 15 cells. #104

Open giovabattelli opened 2 hours ago

trysherpa[bot] commented 2 hours ago

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

Problem Summary

The issue requires modifying the Battleship game to support a board size of up to 25 cells, instead of the current maximum of 15 cells.

Relevant Files

Guidance for Code Changes

BattleshipSalvo.java

AbstractPlayer.java

Board.java

ViewImpl.java

Summary

To address the issue, you need to update the board size constraints in the BattleshipSalvo controller to allow dimensions up to 25 cells. Ensure that the ship placement logic in AbstractPlayer and the board initialization in Board are compatible with larger sizes. Additionally, verify that the ViewImpl class can display larger boards correctly. The end goal is to seamlessly integrate the new board size into the existing game logic without disrupting current functionality.