All you have to do is use your mouse to move the ship to the coin.
I got the idea from a book called Code Your Own Game. Then I added some of my own ideas.