Mercurial > repo
annotate src/ploki/examples/hanoi.pk @ 10137:1b62acac4ed3
<boily> learn Goats will eat and drink anything, except tea. Solain is unavailable for details.
author | HackBot |
---|---|
date | Sun, 15 Jan 2017 14:04:38 +0000 |
parents | ac0403686959 |
children |
rev | line source |
---|---|
4223 | 1 #!../ploki |
2 IF \ARG < 2 | |
3 WUNT "Usage: \V\ARG:0 NUMBER\n" | |
4 END -1 | |
5 FI | |
6 LET a "a" | |
7 LET b "b" | |
8 LET c "c" | |
9 move \ARG:1 | |
10 WUNT "\n" | |
11 END | |
12 FOR move IF \@ > 0 | |
13 LEET ax a | |
14 LEET bx b | |
15 LEET cx c | |
16 LET b cx | |
17 LET c bx | |
18 move \@ - 1 | |
19 WUNT (ax_bx_" ") | |
20 LET a cx | |
21 LET b bx | |
22 LET c ax | |
23 move \@ - 1 | |
24 FI | |
25 KTHX |