/[enigma]/enigma/data/levels/ant.lua
ViewVC logotype

Diff of /enigma/data/levels/ant.lua

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by ant_39, Fri Apr 25 16:34:53 2003 UTC revision 1.18 by ant_39, Sat Jun 21 18:00:57 2003 UTC
# Line 63  Line 63 
63  --   some improvements in handling default cell key meanings at multichar maps  --   some improvements in handling default cell key meanings at multichar maps
64  -- 2003-04-12 -- interface of add_multiobject changed to match interface of other multiples  -- 2003-04-12 -- interface of add_multiobject changed to match interface of other multiples
65  -- 2003-04-25 -- boolean tables  -- 2003-04-25 -- boolean tables
66    -- 2003-06-19 -- render_puzzles accepts a 'kind' argument. Thanks to ralf!
67    
68    
69  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
# Line 1083  end Line 1084  end
1084  -- PUZZLE GENERATOR  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  -- PUZZLE GENERATOR  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1085  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1086  -- see ant.lua documentation for extensive howto  -- see ant.lua documentation for extensive howto
1087  function render_puzzles(tab, generatorfunc)  function render_puzzles(tab, kind, generatorfunc)
1088     for _,val in tab do     for _,val in tab do
1089          local kind = kind or puzzle
1090        local x,y = val.x, val.y        local x,y = val.x, val.y
1091    
1092        local up   = (tab[getkey(x, y-1)] ~= nil) or 0;        local up   = (tab[getkey(x, y-1)] ~= nil) or 0;
# Line 1093  function render_puzzles(tab, generatorfu Line 1095  function render_puzzles(tab, generatorfu
1095        local right= (tab[getkey(x+1, y)] ~= nil) or 0;        local right= (tab[getkey(x+1, y)] ~= nil) or 0;
1096    
1097        if (generatorfunc) then        if (generatorfunc) then
1098           generatorfunc(x,y);           generatorfunc(val);
1099        end        end
1100    
1101        if (val.tag~=2) then        if ((val.tag~=2) and (kind)) then
1102           puzzle(x, y, getglobal("PUZ_"..up..right..down..left))           kind(x, y, getglobal("PUZ_"..up..right..down..left))
1103        end        end
1104     end     end
1105  end  end
# Line 1274  end Line 1276  end
1276  -- BOOLEAN TABLES -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  -- BOOLEAN TABLES -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1277  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1278  -- see ant.lua documentation for extensive howto  -- see ant.lua documentation for extensive howto
 --  
 -- a(C, D) -> C i D ovlivnuji jednu tabulku s metodou and  
 -- o(a(C), D) -> C ovlivnuje jednu tabulku andem, tato tabulka a D ovlivnuji druhou orem  
1279    
1280  -- bool_and tests table for and: all elements have to be '1' to succeed  -- bool_and tests table for and: all elements have to be '1' to succeed
1281  function bool_and(tab)  function bool_and(tab)

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26