Overview
A single-player Battleship game built with JavaScript, HTML, and CSS. The player and a basic computer opponent take turns attacking coordinates on two grids.
Gameplay
- Place fleets randomly, checking board boundaries and ship collisions.
- Show hits, misses, and sunk ships as the match progresses.
- Detect the winner when an entire fleet has been destroyed.
Implementation
Ship, gameboard, and player logic are separated from game flow and DOM rendering. A small publish-subscribe module connects state changes to the interface. Webpack bundles the application for the browser.
The current project focuses on one player against the computer. The README lists manual ship placement, local two-player mode, and a replay flow as future work.