桌球


                               
               
                # -*- coding: utf-8 -*-
from Tkinter import *
from tkMessageBox import showinfo
ROWS = 5    #行数
COLS = 10    #列数
WIDTH = 50    #宽度
HEIGHT = 20    #高度
GAP = 16     #间隙
BALL_RADIUS = 10    #半径
FRAMES_PER_SEC = 100    #刷新率
BGCOLOR = '#a586ca'
FILLCOLOR = '#000000'
LINECOLOR = '#000000'
GAPCOLOR = '#ff0000'
CNT = ROWS*COLS #砖总数
BOARD_WIDTH = (WIDTH + GAP) * COLS + GAP
BOARD_HEIGHT = (HEIGHT + GAP) * ROWS * 3
ball = [BOARD_WIDTH/2,BOARD_HEIGHT-20] #球初始位置
def moveBall():
        global CNT<span style="color: rgb(0, 0%2