mp3
来源:互联网 发布:最近好看的网络剧 编辑:程序博客网 时间:2024/04/28 07:35
def shuffle_boxs_color(boxs):
global ALLCOLORS
num_colors_need = NUMBOXHORIZONTAL * NUMBOXVERTIVAL / 2
assert num_colors_need == NUMBOXHORIZONTAL * NUMBOXVERTIVAL / 2.0
colors = ALLCOLORS[:]
random.shuffle(colors)
colors = colors[:num_colors_need]
colors = colors * 2
random.shuffle(colors)
for i in range(NUMBOXHORIZONTAL):
for j in range(NUMBOXVERTIVAL):
boxs[i][j].color = colors[0]
boxs[i][j].surf.fill(colors[0])
del colors[0]
def get_box_pixel_topleft(boxs,mousex,mousey):
for i in range(NUMBOXHORIZONTAL):
for j in range(NUMBOXVERTIVAL):
box_rect = pygame.Rect(XRBW(boxs[i][j].x),YRBW(boxs[i][j].y),BOXWIDTH,BOXHEIGHT)
if box_rect.collidepoint(mousex,mousey):
return box_rect.top,box_rect.left
return None,None
def get_box_x_y(boxs,mousex,mousey):
for i in range(NUMBOXHORIZONTAL):
for j in range(NUMBOXVERTIVAL):
box_rect = pygame.Rect(XRBW(boxs[i][j].x),YRBW(boxs[i][j].y),BOXWIDTH,BOXHEIGHT)
if box_rect.collidepoint(mousex,mousey):
return (i,j)
return (None,None)
def anim_highlight_box(boxs,box_pixel_topleft):
top = box_pixel_topleft[0]
left = box_pixel_topleft[1]
pygame.draw.rect(DISPLAYSURF, HIGHLIGHTCOLOR, (left - 5, top - 5, BOXWIDTH + 10, BOXHEIGHT + 10), 4)
def init_boxs_revealed(boxs):
for i in range(NUMBOXHORIZONTAL):
for j in range(NUMBOXVERTIVAL):
boxs[i][j].is_revealed = False
- MP3
- mp3................
- mp3
- mp3
- mp3
- mp3
- MP3
- mp3
- mp3
- mp3
- 【MP3】MP3格式分析
- MP3文件格式
- MP3文件格式
- MP3 Format
- mp3文件格式
- MP3文件格式
- MP3 文件格式
- MP3文件格式
- 打印螺旋矩阵
- python 学习笔记之minidom
- 细说容器内的各成员函数的使用范围(绝对全)
- 关于文件关联
- linux命令(1)
- mp3
- Qt使用QStackedWidget实现堆栈窗口
- Android开发环境搭建
- Exception的finally是否执行
- 按需动态加载js文件
- ffmpeg 在windows 上编译(经验小总)
- mp4
- C#技巧—序列化和反序列化
- 面向接口编程详解(一)——思想基础