05AB1E, (削除) 27 26 25 23 (削除ここまで) 22 bytes
Saved 3 bytes thanks to Grimy
⤋>Šε’uχ’slkDÈiV}Y}Λ
Explanation (outdated)
vā # forpush each[1 ... len(letterinput)]
y,¤‹ index N) in input # check each number if its less than the max
g<NÊ> > # (len(input)-1 != N) +# 1increment
# thisresults isin thea lengthlist toas writelong as the currentinput letterwhere each number is 2
y # apart from the currentlast letterone, this is the lengths to printdraw
Š ’uχ’ylk # getmove the2 indexcopies of the currentinput lower-caseto letterthe intop "ubridal"of the stack
DY‚ # pairthe afirst copyone withis the previous directionstring (initiallyto 2=right)draw
ε sè } # usefor each char in the othersecond copy to index into this pair
’uχ’slk # get the chars index in "ubridal"
# u,r,d,l will give its index in "ubridal"D (0,2,4,6)
# duplicate
#Èi corresponding} to the proper direction and everything# else
if the index is even
V # willstore resultit in theY
previous direction being used again Y # push Y (initially 2)
DV # updatethis previous_directiongives forus the nextlist iteration
of directions
Λ # printdraw everything on the canvas
05AB1E, (削除) 27 26 25 23 (削除ここまで) 22 bytes
Saved 3 bytes thanks to Grimy
⤋>Šε’uχ’slkDÈiV}Y}Λ
Explanation (outdated)
v # for each (letter y, index N) in input
g<NÊ> # (len(input)-1 != N) + 1
# this is the length to write the current letter
y # the current letter to print
’uχ’ylk # get the index of the current lower-case letter in "ubridal"
DY‚ # pair a copy with the previous direction (initially 2=right)
sè # use the other copy to index into this pair
# u,r,d,l will give its index in "ubridal" (0,2,4,6)
# corresponding to the proper direction and everything else
# will result in the previous direction being used again
DV # update previous_direction for the next iteration
Λ # print on canvas
05AB1E, (削除) 27 26 25 23 (削除ここまで) 22 bytes
Saved 3 bytes thanks to Grimy
⤋>Šε’uχ’slkDÈiV}Y}Λ
Explanation
ā # push [1 ... len(input)]
¤‹ # check each number if its less than the max
> # increment
# results in a list as long as the input where each number is 2
# apart from the last one, this is the lengths to draw
Š # move 2 copies of the input to the top of the stack
# the first one is the string to draw
ε } # for each char in the second copy ’uχ’slk # get the chars index in "ubridal"
D # duplicate
Èi } # if the index is even
V # store it in Y
Y # push Y (initially 2)
# this gives us the list of directions
Λ # draw everything on the canvas
05AB1E, (削除) 27 26 25 23 (削除ここまで) 2322 bytes
Saved 23 bytes thanks to Grimy
vg<NÊ>y’uχ’ylkDY‚sèDVΛ⤋>Šε’uχ’slkDÈiV}Y}Λ
Explanation (outdated)
v # for each (letter y, index N) in input
g<NÊ> # (len(input)-1 != N) + 1
# this is the length to write the current letter
y # the current letter to print
’uχ’ylk # get the index of the current lower-case letter in "ubridal"
DY‚ # pair a copy with the previous direction (initially 2=right)
sè # use the other copy to index into this pair
# u,r,d,l will give its index in "ubridal" (0,2,4,6)
# corresponding to the proper direction and everything else
# will result in the previous direction being used again
DV # update previous_direction for the next iteration
Λ # print on canvas
05AB1E, (削除) 27 26 25 (削除ここまで) 23 bytes
Saved 2 bytes thanks to Grimy
vg<NÊ>y’uχ’ylkDY‚sèDVΛ
Explanation
v # for each (letter y, index N) in input
g<NÊ> # (len(input)-1 != N) + 1
# this is the length to write the current letter
y # the current letter to print
’uχ’ylk # get the index of the current lower-case letter in "ubridal"
DY‚ # pair a copy with the previous direction (initially 2=right)
sè # use the other copy to index into this pair
# u,r,d,l will give its index in "ubridal" (0,2,4,6)
# corresponding to the proper direction and everything else
# will result in the previous direction being used again
DV # update previous_direction for the next iteration
Λ # print on canvas
05AB1E, (削除) 27 26 25 23 (削除ここまで) 22 bytes
Saved 3 bytes thanks to Grimy
⤋>Šε’uχ’slkDÈiV}Y}Λ
Explanation (outdated)
v # for each (letter y, index N) in input
g<NÊ> # (len(input)-1 != N) + 1
# this is the length to write the current letter
y # the current letter to print
’uχ’ylk # get the index of the current lower-case letter in "ubridal"
DY‚ # pair a copy with the previous direction (initially 2=right)
sè # use the other copy to index into this pair
# u,r,d,l will give its index in "ubridal" (0,2,4,6)
# corresponding to the proper direction and everything else
# will result in the previous direction being used again
DV # update previous_direction for the next iteration
Λ # print on canvas
05AB1E, (削除) 27 26 25 (削除ここまで) 23 bytes
Saved 2 bytes thanks to Grimy
vg<NÊ>y’uχ’ylkDY‚sèDVΛ
Explanation
v # for each (letter y, index N) in input
g<NÊ> # (len(input)-1 != N) + 1
# this is the length to write the current letter
y # the current letter to print
’uχ’ylk # get the index of the current lower-case letter in "ubridal"
DY‚ # pair a copy with the previous direction (initially 2=right)
sè # use the other copy to index into this pair
# u,r,d,l will give its index in "ubridal" (0,2,4,86)
# corresponding to the proper direction and everything else
# will result in the previous direction being used again
DV # update previous_direction for the next iteration
Λ # print on canvas
05AB1E, (削除) 27 26 25 (削除ここまで) 23 bytes
Saved 2 bytes thanks to Grimy
vg<NÊ>y’uχ’ylkDY‚sèDVΛ
Explanation
v # for each (letter y, index N) in input
g<NÊ> # (len(input)-1 != N) + 1
# this is the length to write the current letter
y # the current letter to print
’uχ’ylk # get the index of the current lower-case letter in "ubridal"
DY‚ # pair a copy with the previous direction (initially 2=right)
sè # use the other copy to index into this pair
# u,r,d,l will give its index in "ubridal" (0,2,4,8)
# corresponding to the proper direction and everything else
# will result in the previous direction being used again
DV # update previous_direction for the next iteration
Λ # print on canvas
05AB1E, (削除) 27 26 25 (削除ここまで) 23 bytes
Saved 2 bytes thanks to Grimy
vg<NÊ>y’uχ’ylkDY‚sèDVΛ
Explanation
v # for each (letter y, index N) in input
g<NÊ> # (len(input)-1 != N) + 1
# this is the length to write the current letter
y # the current letter to print
’uχ’ylk # get the index of the current lower-case letter in "ubridal"
DY‚ # pair a copy with the previous direction (initially 2=right)
sè # use the other copy to index into this pair
# u,r,d,l will give its index in "ubridal" (0,2,4,6)
# corresponding to the proper direction and everything else
# will result in the previous direction being used again
DV # update previous_direction for the next iteration
Λ # print on canvas