If the game freezes, just click inside it (games can get unresponsive if you click elsewhere on the page).
Dig through the cave as you grab the gems and avoid monsters. Watch out for gaps and dirt to dig.
Use arrow keys to move.
A to jump.
S to break rock.