Just press up down right and left key to move, you can hit your self, but you can't hit the wall. Eat the apple to increase your score get grow longer.
It's easy to make this game, a hint is to use the " clones ".