Beispiel #1
0
            self.master = (self.master + 1) % 2
        # print(self.biggest)


if __name__ == '__main__':
    # Initialize pygame
    pygame.init()
    setting = UI.Setting()

    SCREEN_WIDTH, SCREEN_HEIGHT = setting.SCREEN_WIDTH, setting.SCREEN_HEIGHT
    x, y = 150, 60
    os.environ['SDL_VIDEO_WINDOW_POS'] = "%d,%d" % (x, y)
    screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
    pygame.display.set_caption("升级")

    background = UI.Background(screen, setting)
    judge = Judge()
    #judge.level = [12,13]
    while True:

        time.sleep(0.1)
        judge.new_game(background)
        judge.run_game(background)
        background.initial()

        if judge.level[0] == 13 or judge.level[1] == 13:
            print(judge.level)
            if judge.level[0] > judge.level[1]:
                print('East and West WIN')
            else:
                print('South and North WIN')