Skip to content
Snippets Groups Projects
Commit 339094e4 authored by dg's avatar dg
Browse files

maze

git-svn-id: http://svn.net-core.org/repos/t-engine4@17 51575b47-30f0-44d4-a5cc-537603b46e54
parent 744b71b7
No related branches found
No related tags found
No related merge requests found
......@@ -9,8 +9,6 @@ function _M:init(map, floor, wall, up, down)
end
function _M:generate()
local backentity = engine.Entity.new{display='*', color_r=128, color_g=128, color_n=128}
for i = 0, self.map.w - 1 do for j = 0, self.map.h - 1 do
self.map(i, j, Map.TERRAIN, self.wall)
end end
......@@ -60,6 +58,6 @@ function _M:generate()
end
-- Always starts at 1, 1
self.map(1, 1, Map.TERRAIN, self.up)
self.map(math.floor(self.map.w/2)*2-3, math.floor(self.map.h/2)*2-3, Map.TERRAIN, self.up)
self.map(math.floor(self.map.w/2)*2-1-2*(1-math.mod(self.map.w,2)), math.floor(self.map.h/2)*2-1-2*(1-math.mod(self.map.h,2)), Map.TERRAIN, self.down)
return 1, 1
end
return {
name = "ancient ruins",
max_level = 5,
width = 15, height = 25,
width = 26, height = 25,
generator = {
class= "engine.generator.Maze",
floor = "FLOOR",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment