2022-03-27 16:43:15 +02:00
|
|
|
import math
|
|
|
|
|
2022-03-27 18:11:51 +02:00
|
|
|
import pygame
|
|
|
|
|
2022-03-20 09:47:49 +01:00
|
|
|
|
|
|
|
class Colors:
|
2022-03-27 16:43:15 +02:00
|
|
|
ORANGE = (255, 140, 0)
|
|
|
|
RED = (255, 0, 0)
|
|
|
|
GREEN = (5, 112, 0)
|
|
|
|
BLACK = (0, 0, 0)
|
|
|
|
WHITE = (255, 255, 255)
|
|
|
|
GREY = (84, 84, 84)
|
|
|
|
|
2022-04-02 13:04:51 +02:00
|
|
|
|
2022-03-27 18:11:51 +02:00
|
|
|
class Fonts:
|
2022-04-02 13:04:51 +02:00
|
|
|
pygame.init()
|
|
|
|
monospace_20 = pygame.font.SysFont("monospace", 20)
|
|
|
|
monospace_80 = pygame.font.SysFont("monospace", 80)
|
2022-03-27 18:11:51 +02:00
|
|
|
|
2022-03-20 09:47:49 +01:00
|
|
|
|
|
|
|
class SquareConfig:
|
2022-03-27 16:43:15 +02:00
|
|
|
width = 10
|
|
|
|
height = 10
|
2022-03-20 09:47:49 +01:00
|
|
|
|
2022-03-27 16:43:15 +02:00
|
|
|
unclicked_color = Colors.BLACK
|
|
|
|
clicked_color = Colors.WHITE
|
2022-03-20 09:47:49 +01:00
|
|
|
|
2022-03-27 16:43:15 +02:00
|
|
|
|
|
|
|
class GeneralConfig:
|
|
|
|
width = 1000
|
|
|
|
height = 1000
|
|
|
|
fields_amount_x = math.trunc(width / SquareConfig.width)
|
|
|
|
fields_amount_y = math.trunc(height / SquareConfig.height)
|
|
|
|
fps = 150
|
|
|
|
window_caption = "GOL"
|
2022-04-02 13:04:51 +02:00
|
|
|
evolve_speed = 360 # ziemlich slow das updated abhängig davon wie viele mill sec das game seit dem letzten mal gelaufen ist im schnitt sind das so 60
|