Press the green flag then use the arrow keys to dodge the crystal and eat the fruit.
Thanks to @Foldedstar for the original. I really enjoyed playing it! Thanks to Carol Vorderman for the books that taught me how to code.