nekomata_saren@tg says to YSITD for cell in n: if self.grid[cell[1]][cell[0]]: n.remove(cell) 這句很重要,上下左右 把撞牆的可能性刪掉