lyceum-env/clubs/chess/config/constants.py

34 lines
1.2 KiB
Python

import os
import pygame
# Board
WIDTH = 640
HEIGHT = 640
ROWS = 8
COLS = 8
SQUARE_SIZE= WIDTH//COLS
# Colours
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
LIGHT_BROWN = (240, 217, 181)
DARK_BROWN = (181, 136, 99)
# Pieces
PIECES = {
'white_pawn': pygame.image.load(os.path.join('assets', 'images', "w_pawn.png")),
'white_rook': pygame.image.load(os.path.join('assets', 'images', "w_rook.png")),
'white_knight': pygame.image.load(os.path.join('assets', 'images', "w_knight.png")),
'white_bishop': pygame.image.load(os.path.join('assets', 'images', "w_bishop.png")),
'white_queen': pygame.image.load(os.path.join('assets', 'images', "w_queen.png")),
'white_king': pygame.image.load(os.path.join('assets', 'images', "w_king.png")),
'black_pawn': pygame.image.load(os.path.join('assets', 'images', "b_pawn.png")),
'black_rook': pygame.image.load(os.path.join('assets', 'images', "b_rook.png")),
'black_knight': pygame.image.load(os.path.join('assets', 'images', "b_knight.png")),
'black_bishop': pygame.image.load(os.path.join('assets', 'images', "b_bishop.png")),
'black_queen': pygame.image.load(os.path.join('assets', 'images', "b_queen.png")),
'black_king': pygame.image.load(os.path.join('assets', 'images', "b_king.png"))
}