Mercurial > repo
annotate src/ploki/examples/hanoi.pk @ 10513:28c4c6b6e9bd
<wob_jonas> `` sed -i \'s/M3/Saw Gerrera|Shmi|Sio Bibble|Sith Lord Jar Jar|Supreme Leader Snoke|Taun We|Watto|Wedge Antilles|Willard|Yoda|Zam Wessel|the Dianoga|the Rancor|the Sarlacc/\' bin/starwars && cat bin/starwars
author | HackBot |
---|---|
date | Sun, 26 Mar 2017 02:00:49 +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 |