<?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="Cover Your Ears" el:subtitle="" el:id="duffy40"/>
      <el:version el:score="1" el:release="1" el:revision="1" el:status="released"/>
      <el:author  el:name="Jacob Scott" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2003 Jacob Scott</el:copyright>
      <el:license el:type="GPL v2.0 or above" el:open="true"/>
      <el:compatibility el:enigma="0.92">
      </el:compatibility>
      <el:modes el:easy="false" el:single="true" el:network="true"/>
      <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[
rooms_wide=3
rooms_high=3

levelw=1+(19*rooms_wide)
levelh=1+(12*rooms_high)

create_world( levelw, levelh)
enigma.TwoPlayerGame = 1

fill_floor("fl-bluegreen", 0,0,levelw,levelh)

function renderLine( line, pattern)
    for i=1, strlen(pattern) do
        local c = strsub( pattern, i, i)
        if c =="#" then
            set_stone( "st-greenbrown", i-1, line)
        elseif c == "o" then
            oxyd( i-1, line)
        elseif c == "!" then
            abyss(i-1,line)
        elseif c=="z" then
            set_actor("ac-blackball", i-.5,line+.5)
        elseif c=="y" then
            set_actor("ac-whiteball", i-.5,line+.5, {player=0})
        elseif c=="H" then
            hollow(i-1,line)
        elseif c == "d" then --1-d
            set_floor("fl-gradient",  i-1,  line, {type=1})
        elseif c == "u" then --2-u
            set_floor("fl-gradient",  i-1,  line, {type=2})
        elseif c == "r" then --3-r
            set_floor("fl-gradient",  i-1,  line, {type=3})
        elseif c == "l" then --4-l
            set_floor("fl-gradient",  i-1,  line, {type=4})
        elseif c=="W" then
            oneway(i-1,line, enigma.WEST)
            set_floor("fl-gradient",  i-1,  line, {type=4})
        elseif c=="N" then
            oneway(i-1,line, enigma.NORTH)
            set_floor("fl-gradient",  i-1,  line, {type=2})
        elseif c=="E" then
            oneway(i-1,line, enigma.EAST)
            set_floor("fl-gradient",  i-1,  line, {type=3})
        elseif c=="S" then
            oneway(i-1,line, enigma.SOUTH)
            set_floor("fl-gradient",  i-1,  line, {type=1})
        end
    end
end

-- Floor:  " "
-- Border: "#"
-- Oxyd:   "o"

renderLine(00,"       #o#######################o##################       ")
renderLine(01,"       #rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrEdddd#       ")
renderLine(02,"       #rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrEdddd#       ")
renderLine(03,"       #rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrEdddd#       ")
renderLine(04,"       #rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrEdddd#       ")
renderLine(05,"       #NNNN##################################dddd#       ")
renderLine(06,"       #uuuu#                                #dddd#       ")
renderLine(07,"       #uuuu#                                #dddd#       ")
renderLine(08,"       #uuuu#                                #dddd#       ")
renderLine(09,"       #uuuu#                                #dddd#       ")
renderLine(10,"       #uuuu#                                #dddd#       ")
renderLine(11,"       #uuuu#                                #dddd#       ")
renderLine(12,"       #uuuu#      ######o######o######      #dddd#       ")
renderLine(13,"       #uuuu#      #                  #      #dddd#       ")
renderLine(14,"       #uuuu#      #                  #      #dddd#       ")
renderLine(15,"       #uuuu#      o                  o      #dddd#       ")
renderLine(16,"       #uuuu#      #                  #      #dddd#       ")
renderLine(17,"       #uuuu#      #                  #      #dddd#       ")
renderLine(18,"       ouuuu#      #        oo        #      #ddddo       ")
renderLine(19,"       #uuuu#      #                  #      #dddd#       ")
renderLine(20,"       #uuuu#      #                  #      #dddd#       ")
renderLine(21,"       #uuuu#      o                  o      #dddd#       ")
renderLine(22,"       #uuuu#      #                  #      #dddd#       ")
renderLine(23,"       #uuuu#      #                  #      #dddd#       ")
renderLine(24,"       #uuuu#      ######o######o######      #dddd#       ")
renderLine(25,"       #uuuu#                                #dddd#       ")
renderLine(26,"       #uuuu#                                #dddd#       ")
renderLine(27,"       #uuuu#                                #dddd#       ")
renderLine(28,"       #uuuu#                                #dddd#       ")
renderLine(29,"       #uuuu#                                #dddd#       ")
renderLine(30,"       #uuuu#                                #dddd#       ")
renderLine(31,"       #uuuu##################################SSSS#       ")
renderLine(32,"       #uuuuWlllllllllllllllllllllllllllllllllllll#       ")
renderLine(33,"       #uuuuWlllllllllllllllllllllllllllllllllllll#       ")
renderLine(34,"       #uuuuWlllllllllllllllllllllllllllllllllllll#       ")
renderLine(35,"       #uuuuWlllllllllllllllllllllllllllllllllllll#       ")
renderLine(36,"       ##################o#######################o#       ")

oxyd_shuffle()

local actor1=set_actor("ac-blackball", 34.5,15.5)
local actor2=set_actor("ac-whiteball",  49.5, 2.5)

-- set_item("it-yinyang",34,15)
-- set_item("it-yinyang",49,2)

AddRubberBand(actor1, actor2, 20, 0)
    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
