def __init__(self):
#window setup
pygame.display.set_caption('Game Of Life')
# initiate the clock and screen
self.clock = pygame.time.Clock()
self.last_tick = pygame.time.get_ticks()
self.screen_res = [740, 490]
self.font = pygame.font.SysFont("Impact", 19)
self.sprites = pygame.sprite.Group()
self.cells = []
self.generation = 0
self.population = 0
self.screen = pygame.display.set_mode(self.screen_res, pygame.HWSURFACE, 32)
self.running = False
self.createGrid()
while 1:
self.Loop()
评论列表
文章目录