python3迷宫,多线程版
直接上代码 1 #!/usr/bin/python3 2 #coding=GB2312 3 import tkinter as tk 4 import threading 5 import time 6 import random 7 import sys 8 9 class Cell(): 10 def __init__(self, row, col): 11 self.row, self.col = row, col 12 self.top, self.right, self.bottom, self.left = True, True, True, True 13 self.visited = False 14 def __str__(self): 15 return 'row:{} col:{}--{} {} {} {}'.format( \ 16 self.row, self.col, self.top, self.right, \ 17 self.bottom, self.left) 18 def setVisited(self): 19 self.visited = True 20 def isVisited(self): 21 return self.visited 22 23 class Maze(threading.Thread): 24 colCount =