Snake Game Implementation
Design a Snake game class with a 40x30 screen, wrapping boundaries, automatic growth every 5 moves, and collision detection for game over conditions.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early July, 2026
Senior
Late October, 2025
Senior
The user wants me to design a Snake game class in Python (or your preference language) with specific requirements. Let me break down the requirements: Screen size: 40 width x 30 height Initial snake size: 3 Every 5 movements: increase snake size by 1 Wrapping: if snake moves out of screen, it appears on opposite side Movement: UP, DOWN, RIGHT, LEFT moves by 1 unit Game over condition: if the tail catches the head (snake hits itself) # interface SnakeGame { # moveSnake(snakeDirection); # isGameOver(); # }
Hello Interview Premium
Your account is free and you can post anonymously if you choose.