Water collected between towers: Difference between revisions

Content added Content deleted
Line 3,055: Line 3,055:
[ dup 0 = iff drop done
[ dup 0 = iff drop done
dup 2 times
dup 2 times
[ 25 * 1 walk
[ 20 * 1 walk
1 4 turn
1 4 turn
25 1 walk
20 1 walk
1 4 turn ] ] is bar ( [ --> )
1 4 turn ] ] is bar ( [ --> )


Line 3,067: Line 3,067:
dup colour
dup colour
fill bar
fill bar
dup 25 * 1 fly
dup 20 * 1 fly
dip
dip
[ behead
[ behead
Line 3,073: Line 3,073:
dup colour
dup colour
fill bar ]
fill bar ]
-25 * 1 fly
-20 * 1 fly
1 4 turn
1 4 turn
25 1 fly
20 1 fly
-1 4 turn ]
-1 4 turn ]
drop
drop
1 4 turn
1 4 turn
-25 * 1 fly ] is chart ( [ [ --> )
-20 * 1 fly ] is chart ( [ [ --> )


[ [] 0 rot witheach
[ [] 0 rot witheach
Line 3,111: Line 3,111:
mins diffs sum ] is task2 ( [ --> )
mins diffs sum ] is task2 ( [ --> )


turtle
turtle -540 1 fly


' [ 5 3 7 2 6 4 5 9 1 2 ] task1
' [ [ 1 5 3 7 2 ]

' [ [ 1 5 3 7 2 ]
[ 5 3 7 2 6 4 5 9 1 2 ]
[ 5 3 7 2 6 4 5 9 1 2 ]
[ 2 6 3 5 2 8 1 4 2 2 5 3 5 7 4 1 ]
[ 2 6 3 5 2 8 1 4 2 2 5 3 5 7 4 1 ]
Line 3,122: Line 3,120:
[ 8 7 7 6 ]
[ 8 7 7 6 ]
[ 6 7 10 7 6 ] ]
[ 6 7 10 7 6 ] ]
dup

witheach [ task2 echo sp ]</syntaxhighlight>
witheach
[ dup size swap
task1
1+ 20 * 1 fly ]
witheach
[ task2 echo sp ]</syntaxhighlight>


{{out}}
{{out}}


I see from the discussion page that drawing the towers wasn't part of the task. Here it is anyway.
I see from the discussion page that drawing the towers wasn't part of the task. Here they are anyway.


"What is the use of a book," thought Alice, "without pictures or conversations?"
"What is the use of a book," thought Alice, "without pictures or conversations?"


[[File:Quackery Water collected between towers.png|frame|center]]
[[File:Quackery - Water collected between towers.png|thumb|center]]


<pre>2 14 35 0 0 0 0</pre>
<pre>2 14 35 0 0 0 0</pre>