Discussion Board
There are no previous messagesGo to the following message
Current Forum: Homework 2 Forum
Date: Tue Sep 18 2001 6:28 pm
Author: Liu, William Y. <wyl@andrew.cmu.edu>
Subject: when to stop destroying walls?

I am not sure how to specify the termination condition for the loop in the getDestroyedList() method of the MazeGenerator class.
I understand that the method keeps randomly picking walls to destroy and it should stop when a spanning tree has been created. So for this particular problem, a spanning tree is generated when all rooms lie in the same equivalence class and form a tree. But how do you say this in code? I think the description of this assignment mentions that the loop in the getDestroyedList() method should keep going while the size of the list of destroyed walls is less than the size of the list of rooms. I am not so sure about that. Seems incorrect to me.
Post response

There are no previous messagesGo to the following message
Current Thread Detail:
when to stop destroying walls?      Liu, William Y.      Tue Sep 18 2001 6:28 pm       
Re: when to stop destroying walls?      Batra, Rohan      Tue Sep 18 2001 8:32 pm       
Re: when to stop destroying walls?      Agarwal, Aditya      Tue Sep 18 2001 10:39 pm       

Back to previous screen