Pinstripe/Display: Difference between revisions

Content added Content deleted
m (syntax highlighting fixup automation)
(Added Quackery.)
Line 1,176: Line 1,176:


</syntaxhighlight>
</syntaxhighlight>

=={{header|Quackery}}==

Adapted from [[Colour pinstripe/Display#Quackery]].

<syntaxhighlight lang="Quackery"> [ $ "turtleduck.qky" loadfile ] now!

[ 1280 ] is width ( --> n )
[ 720 ] is height ( --> n )

[ 0 0 0 ] is black ( --> n n n )
[ 255 255 255 ] is white ( --> n n n )

[ [] swap
' [ black white ]
witheach
[ over times
[ dip swap tuck
nested join
unrot ]
drop ]
drop ] is colours ( n --> [ )

[ behead
dup dip
[ nested join ] ] is nextcolour ( [ --> [ [ )

[ nextcolour colour
-1 4 turn
height n->v
4 n->v v/ 2dup walk
-v fly
1 4 turn
1 n->v fly ] is stripe ( [ --> [ )

[ turtle
width n->v 2 1 v/ fly
-1 4 turn
height n->v 2 1 v/ fly
-1 4 turn
4 times
[ i^ 1+ colours
width times stripe
drop
width n->v -v fly
-1 4 turn
height n->v
4 n->v v/ fly
1 4 turn ] ] is pinstripes ( --> )</syntaxhighlight>

{{out}}

[[File:Quackery pinstripes.png|thumb|center]]


=={{header|Racket}}==
=={{header|Racket}}==