I have discovered the rules. The main character eats anything if you approach it while facing it. You have to reach the flag without facing it, like, by moving backwards. The main character changes the direction it is facing if it is moved sideways. It does not change the direction it is facing if it is moved backwards. Backward movement causes it to walk backwards while facing front. You have to manipulate it into eating bricks, pressing buttons (without, usually, eating the button itself unless when required), and touching the flag while facing the other way.