flybird python代码
from itertools import cycle
import random
import sys
import pygame #将pygame库导入到python程序中
from pygame.locals import * #需要引入pygame中的所有常量。
FPS = 30
SCREENWIDTH = 288 #屏幕宽度
SCREENHEIGHT = 512 #屏幕高度
# amount by which base can maximum shift to left
PIPEGAPSIZE = 100 # gap between upper and lower part of pipe 管道上下之间的间隙
BASEY = SCREENHEIGHT * 0.79 #base那个条条所在的高度 注意以左上角为坐标起始点 所以这个高度是往下为正
# image, sound and hitmask dicts
IMAGES, SOUNDS, HITMASKS = {}, {}, {} #图像,声音,撞击的文件
# list of all possible players (tuple of 3 positions of flap) #三种小鸟造型
PLAYERS_LIST = (