Re: Find The Way Out Problem, VB.NET 2003 - solution needed(

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You are thinking walls but you really need to think in cells. The maze is an aray of cells where each array element includes codes to indicate which of its four edges are walls and which are not. If you build your maze like this then it is relatively easy to keep track of where the taveller is, which directions are valid for movement and whether or not the current cell has the exit gap. It is also easy to check if the current cell is a dead end. When you get to constructing your non-random maze it will be constructed as an array - in fact the only algorithm I know for a perfect maze (exactly one solution and that solution traverses the whole maze) requires that it be built cell by cell and then wall by wall for each cell.

You would traverse the pushbuttons to build the current state of the maze (although in practice the state could be maintained dynamically with each button press). But for constructing and examinig the maze it needs to be an array of cells.

"Totti" <saliba.toufic.george@xxxxxxxxx> wrote in message news:4dacd4ff-fd3e-4014-a5aa-5c2992b6cbd7@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Mike you are right but the user has the right to click and make his
own wall and his own maze so what you suggested even though very
correct and i agree, will be left till the end.
What i need here is a loop that traverses the pushbuttons and checks
their states, and maybe keep the information that they have been
visited.when it comes to a dead end, it will look in the array for
somebody who can be traversable and go through it. till it reaches the
end where the pushbutton state is set to out. in the meanwhile, it
should write out the path somehow, i am thinking of changing the
pushbutton color to red or something

.



Relevant Pages

  • Re: Making a maze....
    ... # I just removed some unused functions -- Georgy Pruss 20031118-002204 ... import Maze ... # A maze cell is a vector of three items: ... # (for top and left walls refer to upper and left cells resp.) ...
    (comp.lang.python)
  • Re: Changing Mazes
    ... - The maze should never be made unsolvable by the switch (no spaces ... What about when new wall sections have no remaining bordering walls?) ... This patch will cause the full-level size, ... removed from or added to the maze. ...
    (rec.games.roguelike.nethack)
  • Re: Nationwide & Cup Drivers
    ... walls of the cell. ... and at the next equally certain that it was pitch darkness. ... The door clanged shut again. ... His troubled eyes were gazing at the wall about a metre above the ...
    (comp.os.linux.misc)
  • if the yummy communications can associate terribly, the ugly node may light more jurisdictions
    ... walls of the cell. ... and at the next equally certain that it was pitch darkness. ... The door clanged shut again. ... His troubled eyes were gazing at the wall about a metre above the ...
    (comp.sys.powerpc.tech)
  • Re: Cell Reference Into a Formula
    ... > within the spreadsheet that lists the data related to that wall, ... > Wall Type Fire Rating Wall Material Wall Thickness ... > create the reference to the cell "tpfr21". ...
    (microsoft.public.excel.misc)