from pygame.locals import *

GAME_TITLE = 'Teletris'

# initial scores

# Board constants
BOARD_WIDTH = 12
BOARD_HEIGHT = 22
BOARD_OFFSET_X = 32
BOARD_OFFSET_Y = 32
BLOCK_PIXELS = 32
INFO_PANEL_WIDTH = (BOARD_WIDTH - 1) * BLOCK_PIXELS

# speed
BLOCK_START_SPEED = 500  # Speed blocks fall in milliseconds
KEY_REPEAT = 150  # Key repeat in milliseconds
ROWS_PER_LEVEL = 5  # increase level every X rows
LEVEL_SPEED_INCREASE = 50

# Block colours
EMPTY = 0
RED = 1
GREEN = 2
BLUE = 3
YELLOW = 4
MAGENTA = 5
CYAN = 6
GREY = 7

# image IDs
GAME_BACKGROUND = GREY + 1
HUD_BACKGROUND = GREY + 2

BLOCK_COLOURS = [RED, GREEN, BLUE, YELLOW, MAGENTA, CYAN]

# Shape Types
SQUARE = 1
BAR = 2
LEFT_L = 3
RIGHT_L = 4
LEFT_STEP = 5
RIGHT_STEP = 6

SHAPE_TYPES = [SQUARE, BAR, LEFT_L, RIGHT_L, LEFT_STEP, RIGHT_STEP]
# Player states
DEAD = 0
ALIVE = 1

# Game states
MENU = 0
PLAYING = 1
PAUSED = 2
GAME_OVER = 3

# Game events
BLOCK_DOWN_EVENT = USEREVENT + 1
ROWS_COMPLETE_EVENT = USEREVENT + 2
LEVEL_UP_EVENT = USEREVENT + 3

# Alignment
CENTRE = 0
LEFT = 1
RIGHT = 2
TOP = 3
MIDDLE = 4
BOTTOM = 5
