Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help sovle for ERROR MESSAGE: in main q.mazeSolve(node, maze, startRow, startColumn) AttributeError: 'LinkedQueue' object has no attribute 'mazeSolve' def mazeSolve(self, node, q, maze, startRow, startColumn):

Help sovle for ERROR MESSAGE: in main q.mazeSolve(node, maze, startRow, startColumn) AttributeError: 'LinkedQueue' object has no attribute 'mazeSolve' def mazeSolve(self, node, q, maze, startRow, startColumn): node.self = node q.self = q maze.self = maze startRow.self = startColumn startColumn.self = startColumn if node != None: print("Maze has solved:") path = q path.enqueue(node.data) node = node.next while (node != None): (i, j) = node.data path.enqueue((i, j)) maze[i][j] = '0' node = node.next n = 0 print("Length of the path: ", path.__len__()) # method s = " " while not path.isEmpty(): s += str(path.dequeue()) n += 1 if n % 10 == 0: s = s + " " s = s.rstrip(", ") maze[startRow][startColumn] = 'P' print(str(maze)) print(s) else: print("Maze has no solved: ") print('-----------------------------------------------') def main(): maze = getMazeGridFromFile() print("Find the path of a maze by using a QUEUE: ") (startRow, startColumn) = findStartPos(maze) node = getPath(startRow, startColumn, maze) q = LinkedQueue() q.mazeSolve(node, maze, startRow, startColumn) main() 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions