Stay in the grid without hitting the wall or hitting your own tail. If you eat a number, it adds that number of links to your tail!