def SinglePlayerMood():
global turn
if turn == 1:
c = board()
def on_closing():
if messagebox.askokcancel("Quit", "Do you want to quit?"):
board.root.destroy()
sys.exit()
board.root.protocol("WM_DELETE_WINDOW", on_closing)
make(c)
def right(event):
v.moveRight()
c.root.bind('<KeyPress-Right>',right)
def left(event):
v.moveLeft()
c.root.bind('<KeyPress-Left>',left)
def down(event):
if v.row==0:
v.moveDown()
if v.done == 1:
v.done= 0
make(c)
ai=AI(c,v)
else :
pass
c.root.bind('<KeyPress-Down>',down)
评论列表
文章目录