Thinking in code · Step by step

Turning

Left and right belong to the egg, not to the screen, and that decides where every move after a turn goes.