Workshop › Battleship › Step 20 of 35
The computer will shoot back. Its shots need a grid of their own, on your sea, drawn on your small map.
```js
let theirShots // the same, on your sea
theirShots = grid(null)
drawSea(HOME, SMALL, theirShots, myFleet, true)
```theirShots works exactly like myShots: null, 'miss' or 'hit' for every square, but on your sea.reset gives it an empty grid, and your small map now draws it instead of an always-empty grid(null).let myShots, write let theirShots.reset, under myShots = grid(null), write theirShots = grid(null).draw, pass theirShots instead of grid(null) for your fleet.Skills: Arrays and objects
← Win in as few shots as you can Take turns →