# Battleship · Fleet Command

A complete, responsive player-vs-computer Battleship game. No build step,
dependencies, external assets, or internet connection required.

## Play

Open **index.html** in a modern browser. Alternatively, serve this directory:

```sh
python3 -m http.server 8000
```

Then visit `http://localhost:8000`.

- **Deploy:** drag ships onto your waters, or select a ship and click/tap a starting square. Select or drag a placed ship to reposition it.
- **Rotate:** use the Rotate button or **R**. Ships can touch, but cannot overlap or leave the grid. Shuffle deploys a random, valid fleet.
- **Engage:** place all five ships, then Start battle. Click/tap enemy waters to fire. A hit earns another shot; a miss passes the turn. Sink all five to win.
- **Controls:** **M** toggles sound, **N** starts a new game, arrow keys navigate a grid, and Enter/Space places or fires. Restarting an active mission asks for confirmation.

The computer uses probability-weighted, spaced hunting and follows unresolved
hits to finish ships. It only knows the outcomes of its own shots, never your
hidden ship positions. Help and restart dialogs pause its next move.

`engine.js` contains the rules and AI; `game.js` handles controls, turns,
animations, and synthesized Web Audio sounds. `styles.css` supports desktop,
phone, touch, keyboard focus, and reduced-motion preferences. Sound preference
is saved locally; games are not persisted across reloads.
