Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Some heuristics on the assumptions:</p> <ul> <li>discrete "drops" which occupy exactly one square each</li> <li>the water never remains more than one high on a given tile, </li> <li>the water always remains continuous</li> <li>when the barriers are up they are like walls</li> <li>when the barriers are down they are like open squares</li> </ul> <p>For every puddle, maintain a list of edge squares and open squares next to the edges.</p> <p>When a barrier goes down</p> <pre><code>amend the lists of edge and open squares for any puddles that were touching it </code></pre> <p>When a barrier goes up</p> <pre><code>if (it was covered) pick a non-wall square next to it at random, and add the drop from the barrier there. amend the lists of edge and open squares for any puddles next to the block </code></pre> <p>When you add a drop:</p> <pre><code>if (the square "under" the pipe is empty) fill it else consult the list of edge square associated with the pool under the pipe, and select the one closest to the pipe (if more than one is closest, choose from the candidates at random), and fill it. amend the lists of edge and open squares for the puddle (be prepared to merge with neighboring puddles if necessary) </code></pre> <p>When you remove a drop</p> <pre><code> find the edge (not open!) square farthest from the sink (or randomly select from the equivalent candidates), and empty it amend the lists of edge and open squares for the puddle </code></pre> <p>(a frill available here is to make the "farthest" bounded by equal distance to other sinks, so that squares in the middle of a puddle can become empty if they are between sinks)</p> <p>This isn't very realistic, and doesn't get you any dynamics to speak of, but will maintain continuous puddles "under" the dripping pipes and fill up the available space given enough drips.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload