previous

page 22

next
showing progress

This is what I'm aiming for. The 8 ships at right will "light up" when discovered.

The ships will be numbered 1 to 8. Their images will have ids s1 to s8.

Adding them to the display will be similar to how we added the shapes. The main complication is that each image appears twice. So try writing ships.js which will generate 8 lines like this example:

<img src='images/ships/3.png' class='ship' id='s6'>

I used variables fn (file number) and sn (ship number).

previous
next