<?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="- Snow White -" el:subtitle="" el:id="ant15"/>
      <el:version el:score="1" el:release="2" el:revision="2" el:status="released"/>
      <el:author  el:name="Petr Machata" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2003 Petr Machata</el:copyright>
      <el:license el:type="GPL v2.0 or above" el:open="true"/>
      <el:compatibility el:enigma="1.10"/>
      <el:modes el:easy="false" el:single="true" el:network="false"/>
      <el:comments><el:code>New API converted by R. Bourquin</el:code></el:comments>
      <el:score el:easy="-" el:difficult="-"/>
    </el:info>
    <el:luamain><![CDATA[
ti["_"] = {"fl_rough"}
ti["-"] = {"fl_inverse"}
ti["."] = {"fl_abyss"}
ti["#"] = ti["_"] .. {"st_rawglass"}
ti["O"] = {"it_meditation_hollow", "med#"}
ti["@"] = {"#ac_marble_white", owner=YIN, controllers=CTRL_YIN, name="white"} .. ti({"it_document", text="text1"})

wo(res.random(ti, {" ", {"o", "O"}}, {"_", "-"}), "_", {
    "####################",
    "#..................#",
    "#.                .#",
    "#.                .#",
    "#.  @             .#",
    "#.                .#",
    "#.           o   o.#",
    "#.                .#",
    "#.                .#",
    "#.                .#",
    "#.             o  .#",
    "#..................#",
    "####################"})
    
wo[no["med#*"]] = ti({"st_chameleon"})

local number = 3
local radius = 2.0
local theta = 2.0*math.pi/number
local segment = 2.0*radius*math.sin(theta/2.0)
for i=0,number-1 do
    wo[no["white"]+po(0.5,0.5)+po(radius*math.cos(i*theta-math.pi/2.0), radius*math.sin(i*theta-math.pi/2.0))] = {"ac_pearl", name="ball#", controllers=CTRL_NONE, essential=INDISPENSABLE}
end
local balls = no["ball#*"]:sort("circular")
for i=0,#balls-1 do
    wo:add({"ot_rubberband", anchor1=no["white"], anchor2=balls[i+1], length=radius, threshold=radius, strength=10})
    wo:add({"ot_rubberband", anchor1=balls[i+1], anchor2=balls[(i+1)%number+1], length=segment, threshold=segment, strength=40})
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="true">Look ... they're over there!</el:english>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
