User Tools

Site Tools


lua:scripting:firetemple

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lua:scripting:firetemple [2015/01/01 09:41] vodurlua:scripting:firetemple [2015/01/01 09:50] (current) vodur
Line 107: Line 107:
 end end
  
---local cell=501+--Randomized Prim's algorithm http://en.wikipedia.org/wiki/Maze_generation_algorithm
 local walls={} local walls={}
 local maze={} local maze={}
Line 118: Line 118:
     local wallind=randnum(1,#walls)     local wallind=randnum(1,#walls)
     local wall=walls[wallind]     local wall=walls[wallind]
 +    table.remove(walls, wallind)
          
     if not maze[wall.exit.toroom] then     if not maze[wall.exit.toroom] then
Line 130: Line 131:
     end     end
          
-    table.remove(walls, wallind)+    
                                        
 end end
lua/scripting/firetemple.1420105315.txt.gz · Last modified: 2015/01/01 09:41 by vodur