<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<el:level xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://enigma-game.org/schema/level/1 level.xsd" xmlns:el="http://enigma-game.org/schema/level/1">
  <el:protected>
    <el:info el:type="level">
      <el:identity el:title="- Meditation -" el:subtitle="esprit 50" el:id="ss_esp50"/>
      <el:version el:score="1" el:release="1" el:revision="0" el:status="released"/>
      <el:author  el:name="Sven Siggelkow" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2003 Sven Siggelkow</el:copyright>
      <el:license el:type="GPL v2.0 or above" el:open="true"/>
      <el:compatibility el:enigma="0.92">
       <el:dependency el:path="lib/ant" el:id="lib/ant" el:release="1" el:preload="true"/>
      </el:compatibility>
      <el:modes el:easy="false" el:single="true" el:network="false"/>
      <el:comments>
        <el:code>Lua 5.1 and XML converted by Leveladministrators</el:code>
      </el:comments>
      <el:score el:easy="-" el:difficult="-"/>
    </el:info>
    <el:luamain><![CDATA[
cells={}
cells[" "]=cell{floor="fl-leaves"}
cells["#"]=cell{stone="st-invisible"}
cells["B"]=cell{stone="st-actorimpulse_invisible"}
cells["1"]=cell{{{document,"text1"}}}
cells["2"]=cell{{{document,"text2"}}}
cells["3"]=cell{{{document,"text3"}}}
cells["4"]=cell{{{document,"text4"}}}
cells["e"]=cell{floor="fl-bluegray",stone="st-glass"}
cells["h"]=cell{parent=cells[" "],item="it-hollow"}
cells["H"]=cell{parent=cells[" "],item={"it-hollow", {essential=1}}}
cells["T"]=cell{stone={"st-timer", {name="test",action="callback", target="checkout", interval=1}}}

level = {
--  01234567890123456789
   "#B################B# ",--00     
   "Bh3              2hB ",--01     
   "#33              22# ",--02     
   "#                  # ",--03     
   "#               e  # ",--04     
   "#           e   e  #H",--05     
   "#       e   e   e  #T",--06     
   "#   e   e   e   e  # ",--07     
   "#                  # ",--08     
   "#                  # ",--09     
   "#44              11# ",--10     
   "Bh4              1hB ",--11     
   "#B################B# " --12     
}   
set_default_parent(cells[" "])

create_world_by_map(level,cells)

set_actor("ac-whiteball-small", 4.5,8.5,  {player=0, name="s1"})
set_actor("ac-whiteball-small",8.5,8.5,  {player=0,name="s2", mouseforce=1})
set_actor("ac-whiteball-small", 12.5,8.5, {player=0,name="s3", mouseforce=1})
set_actor("ac-whiteball-small",16.5,8.5, {player=0,name="s4", mouseforce=1})

ok=0

function checkout()
local x1,y1 = enigma.GetPos(enigma.GetNamedObject("s1"))
local x2,y2 = enigma.GetPos(enigma.GetNamedObject("s2"))
local x3,y3 = enigma.GetPos(enigma.GetNamedObject("s3"))
local x4,y4 = enigma.GetPos(enigma.GetNamedObject("s4"))
if (x1==18) and (y1==11) then ok=1  else ok=0 end
if (x2==18) and (y2==1)  then ok=ok else ok=0 end
if (x3==1)  and (y3==1)  then ok=ok else ok=0 end
if (x4==1)  and (y4==11) then ok=ok else ok=0 end
if ok==1 then 
enigma.KillItem(20,5) -- if every ball is in its own hole remove Essential hole for finishing level
end
end
     
x=0
y=0                                                             
for x=1,19,2 do
  for y=1,13,2 do
set_floor("fl-leavese1",x,y)
set_floor("fl-leavese2",x,y-1)
set_floor("fl-leavese3",x-1,y)
set_floor("fl-leavese4",x-1,y-1)
end
end
    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
      <el:string el:key="text1">
        <el:english el:translate="false">x=4*4-30/2</el:english>
      </el:string> 
      <el:string el:key="text2">
        <el:english el:translate="false">x=-7-3^2*(-1)^3</el:english>
      </el:string> 
      <el:string el:key="text3">
        <el:english el:translate="false">x=4*3+5-2*7</el:english>
      </el:string> 
      <el:string el:key="text4">
        <el:english el:translate="false">2^x=16</el:english>
      </el:string> 
    </el:i18n>
  </el:protected>
</el:level>
