console_snake/settings.py

40 lines
702 B
Python
Raw Permalink Normal View History

2022-10-26 21:57:29 +03:00
# Main settings
WIDTH = 20
HEIGHT = 20
FPS = 5
2022-10-29 04:25:09 +03:00
WALL_COLOR = "\u001b[31m"
RESET_COLOR = "\u001b[0m"
2022-10-26 21:57:29 +03:00
# Buttons
QUIT_BUTTON = 'q'
2022-10-27 15:29:28 +03:00
PAUSE_BUTTON = 'p'
2022-10-26 21:57:29 +03:00
LEFT_BUTTON = 'a'
RIGHT_BUTTON = 'd'
UP_BUTTON = 'w'
DOWN_BUTTON = 's'
# Player settings
D_LEFT = "LEFT"
D_RIGHT = "RIGHT"
D_UP = "UP"
D_DOWN = "DOWN"
MAIN_DIRECTION = D_DOWN
MAIN_X = 0
MAIN_Y = 0
# Out types
SPACE = 0
WALL = 1
FOOD = 2
WALL_FOOD = 3
2022-10-27 17:03:11 +03:00
HEAD = 4
TT_SPACE = " "
2022-10-29 04:25:09 +03:00
TT_WALL = "\u001b[34m{}\u001b[0m".format("██")
TT_FOOD = "\u001b[33m{}\u001b[0m".format("██")
TT_WALL_FOOD = "\u001b[32m{}\u001b[0m".format("██")
TT_HEAD = "\u001b[36m{}\u001b[0m".format("██")
2022-11-06 22:18:02 +03:00
# Globals
is_pause = False