Friday, January 8, 2010

How do i create Cells or Grids in creating Random Maze in c++?

i plan to use eller's algorithm also.. please help me!!How do i create Cells or Grids in creating Random Maze in c++?
I took a quick glimpse at the algorithm.





You should first define your dimensions.





I think storing an array of cells for each row would be wise. Each row can be order or not, but each cell will keep X,Y coordinates of each component that is connected.





Each row will reference the same cell object if there is a location in that row is connected to a location in a row above or below.





At least that's how I would consider storing the maze.





Like I said though, I spent 3 minutes reading the description and that's what I came up with.

No comments:

Post a Comment