Thinking in code · Step by step
Left and right belong to the egg, not to the screen, and that decides where every move after a turn goes.