share/hedgewars/Data/Scripts/Multiplayer/DiagonalMaze.lua
author sheepluva
Wed, 02 Sep 2015 04:59:17 +0200
changeset 11063 c57f815cbb14
parent 10611 58cad46782ff
child 11064 884f40b6f640
permissions -rw-r--r--
make diagonal maze use map feature size


function onPreviewInit()
onGameInit()
end

function onGameInit()
    MapGen = mgDrawn
    TemplateFilter = 0
    local step = 80 + 10 * MapFeatureSize;
    for y = 48,2048,step do
       for x = 48,4048,step do
            if GetRandom(2) == 0 then
                AddPoint(x,y,1)
                AddPoint(x+step,y+step)
            else
                AddPoint(x,y+step,1)
                AddPoint(x+step,y)
            end
        end
    end
    FlushPoints()
end