Press space to swim upwards. Dodge rocks and don't hit the ground (else you loose a life). Snap up crabs for bonus points. Stay alive as long as possible!
The basic idea and some code is from Usborne's "Coding for Beginners", but everything else is by me.