recipe-578808.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:code 作者: ActiveState 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号