一个功能多一点点的五子棋 def paint_board(self) :
for row in range(0,15) :
if row == 0 or row == 14 :
self.canvas.create_line(25 , 25 row*30 , 25 14*30 , 25 row*30 , width = 2)
else :
self.canvas.create_line(25 , 25 row*30 , 25 14*30 , 25 row*30 , width = 1)
for column in range(0,15) :
if column == 0 or column == 14 :
self.canvas.create_line(25 column*30 ,25, 25 column*30 , 25 14*30 ,width = 2)
else :
self.canvas.create_line(25 column*30 ,25, 25 column*30 , 25 14*30 , width = 1)
self.canvas.create_oval(112, 112, 118, 118, fill="black")
self.canvas.create_oval(352, 112, 358, 118, fill="black")
self.canvas.create_oval(112, 352, 118, 358, fill="black")
self.canvas.create_oval(232, 232, 238, 238, fill="black")
self.canvas.create_oval(352, 352, 358, 358, fill="black")
评论