basic structure of SnakeGame