#!/usr/bin/env python3 # File: constants.py # Description: Basic program constants. # Author: Pavel Benáček # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . from pygame.locals import * # Configuration of building shape block # Width of the shape block BWIDTH = 20 # Height of the shape block BHEIGHT = 20 # Width of the line around the block MESH_WIDTH = 1 # Configuration of the player board # Board line height BOARD_HEIGHT = 7 # Margin of upper line (for score) BOARD_UP_MARGIN = 40 # Margins around all lines BOARD_MARGIN = 2 # Color declarations in the RGB notation WHITE = (255,255,255) RED = (255,0,0) GREEN = (0,255,0) BLUE = (0,0,255) ORANGE = (255,69,0) GOLD = (255,125,0) PURPLE = (128,0,128) CYAN = (0,255,255) BLACK = (0,0,0) # Timing constraints # Time for the generation of TIME_MOVE_EVENT (ms) MOVE_TICK = 1000 # Allocated number for the move dowon event TIMER_MOVE_EVENT = USEREVENT+1 # Speed up ratio of the game (integer values) GAME_SPEEDUP_RATIO = 1.5 # Score LEVEL - first threshold of the score SCORE_LEVEL = 2000 # Score level ratio SCORE_LEVEL_RATIO = 2 # Configuration of score # Number of points for one building block POINT_VALUE = 100 # Margin of the SCORE string POINT_MARGIN = 10 # Font size for all strings (score, pause, game over) FONT_SIZE = 25