# Battleship Controller

The **Battleship Controller** app (`app/battleship-c`) is the phone companion for the shared-screen [Battleship](/battleship/) app.

![icon](pwa-512x512.png "Battleship Controller Icon")

## What it does

- Keeps the captain's fleet private. Ships are only ever drawn on their owner's phone.
- Hides the fleet during placement: tap a ship, tap a square to move it, rotate it, or shuffle the whole layout, then press Ready.
- Picks a rival fleet from colour-coded tabs and aims at a square, which lights a live crosshair on the shared screen before the shot is taken.
- Fires with a confirm button, so a mis-tap never costs a turn.
- Shows your own waters with incoming fire, and buzzes the phone when you are hit.
- Adds or removes AI captains in the lobby and starts the battle, up to six fleets in total.

Coordinates match the shared ocean chart exactly, so a square called `Q12` on a phone is the same square the whole room can see.

Open `/battleship-c/?r=<room>` directly or scan the QR code on the display. The controller stores its captain identity locally, so refreshing or reconnecting drops the player straight back into their own fleet.

## Screenshots

![Arranging the private fleet before battle](screenshot01.png)

![Aiming a salvo at the opposing fleet](screenshot02.png)

![Controller showing shot history during battle](screenshot03.png)
