26 lines
811 B
Python
26 lines
811 B
Python
import random
|
|
import pygame
|
|
import time
|
|
|
|
class Constants:
|
|
def __init__(self):
|
|
self.BLACK = (0, 0, 0)
|
|
self.RED = (255, 0, 0)
|
|
self.GRID_SIZE = 65
|
|
self.GRID_WIDTH = 30
|
|
self.GRID_HEIGHT = 15
|
|
self.WINDOW_SIZE = (self.GRID_WIDTH * self.GRID_SIZE, self.GRID_HEIGHT * self.GRID_SIZE)
|
|
self.background_image = pygame.transform.scale(pygame.image.load('images/tło.jpg'), self.WINDOW_SIZE)
|
|
|
|
self.IS_NIGHT = False
|
|
self.TIME_CHANGE = time.time() + 60
|
|
|
|
self.season = random.choice(["spring", "summer", "autumn", "winter"])
|
|
|
|
self.SIZE = 224
|
|
self.mean = [0.5164, 0.5147, 0.4746]
|
|
self.std = [0.2180, 0.2126, 0.2172]
|
|
|
|
def init_pygame(const):
|
|
pygame.init()
|
|
const.screen = pygame.display.set_mode(const.WINDOW_SIZE) |