# Name: Kristalova studanka
# Version: 1.0
# Original author:     Josef Vaclav Sladek
# Author of Ruby port: Martin Hassman
# QA:                  David Majda



# Znam kristalovou studanku,
# kde nejhlubsi je les,
# (studanka = pool, les = forest)

pool = Pool.new(:cleanness => CRYSTAL)

forest = Forest.new
forest.depth = MAX_DEPTH

forest << pool



# tam roste tmave kapradi
# a vukol, rudy vres
# (kapradi = fern, ves = heather)

forest << Fern.new(:shade => DARK)

pool.surroundings.map { |place| Heather.new(:color => RED) }



# Tam ptaci, lane chodi pit
# pod javorovy kmen.
# (javor = maple, kmen = trunk)

maple.trunk.below = DrinkingPlaces::Animal.new



# Ti ptaci za dne bileho.
# Ty lane v noci jen.
# (ptak = bird, lan = doe)

(1..rand(10)).each do
        forest << (DayTime.is_white_day?) ? Bird.new : Doe.new
end


# Kdyz usnou lesy hluboke
# a kolem ticho jest.
# Tu nebesa i studanka
# jsou plny zlatych hvezd.

if forest.asleep? && !forest.surroundings.sound.exists?
        sky << Star.new until sky.full?
        pool = sky.mirror
end

# EOP = End of Poem