Extended the code using Copilot with tons of cool features. Read the CHAT.md for what I asked and what it did

This commit is contained in:
2026-04-12 18:29:03 -06:00
parent b61b35dfc9
commit d098618b9a
9 changed files with 1931 additions and 301 deletions
+32
View File
@@ -0,0 +1,32 @@
"""Game constants and configuration."""
# Snake defaults
DEFAULT_SNAKE_LENGTH = 3
DEFAULT_SNAKE_SPEED = 7
MIN_SNAKE_SPEED = 1
MAX_SNAKE_SPEED = 10
# Snake/food characters
HEAD_CHAR = ''
BODY_CHAR = ''
FOOD_CHAR = ''
# Screen requirements
MIN_SCREEN_HEIGHT = 10
MIN_SCREEN_WIDTH = 20
# Color pair IDs
COLOR_GREEN = 1
COLOR_RED = 2
COLOR_WHITE = 3
# Speed mapping (snake speed level -> milliseconds delay)
SPEED_TO_MS = {
1: 250, 2: 225, 3: 200,
4: 175, 5: 150, 6: 125,
7: 100, 8: 75, 9: 50, 10: 25
}
# Screen padding
SCREEN_PADDING = 2
MIN_SNAKE_LENGTH = 1