Design a Battleship game with vanilla HTML/CSS/JS.
Implement an interactive board that supports ship placement, alternating turns, hit and miss feedback, sunk-ship detection, and a clear win state without frameworks. For grading the game logic, use play_battleship(board, shots), where board is a list of equal-length strings, . represents water, and identical non-. characters identify cells belonging to the same ship; shots is a list of [row, column] coordinates. Return { "events": [...], "won": boolean }, where each event is miss, hit, sunk, or repeat.
. represents water; each other character identifies a shipdef play_battleship(board, shots):