-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmycorand.bf
16 lines (15 loc) · 1022 Bytes
/
mycorand.bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
p4v p00+1g00 <<<<< v<
#> : | ,"
> 1- :2+"^"\7p "^"32p: | ,t
v? 1- :2+">"\7p "^"33p: | ,i
> 1- :2+"v"\7p "^"34p: | ,m
> 1- :2+"<"\7p "^"35p:| ,e
v +55<<<<< p6+1*36*88p6*54-1*95<"
>" redro eht ni detareneg erew snoitcerid ehT">:#,_" tem saw ?">:#,_g1+."s"^
After going in a direction:
Subtract one from the counter
Place >^v<, according to which direction was taken, in the string
Setup the following being done every time this path is taken again, then do it:
If the counter is zero, output the number of tries needed and the order of >^v< and stop
Add one to the number of tries needed
Go back to the ?