diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-10-19 10:19:21 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-10-19 10:19:21 +1300 |
commit | 9d776656386c3e794187810c466b18ba29575248 (patch) | |
tree | 5a6bc62ef303f0850a5ea62b5f128f2408e380c6 /games/drakon.awk | |
parent | Correct check of --is-work-tree test (diff) | |
download | dotfiles-9d776656386c3e794187810c466b18ba29575248.tar.gz dotfiles-9d776656386c3e794187810c466b18ba29575248.zip |
Add drakon(6df)
Diffstat (limited to 'games/drakon.awk')
-rw-r--r-- | games/drakon.awk | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/games/drakon.awk b/games/drakon.awk new file mode 100644 index 00000000..5d73f74d --- /dev/null +++ b/games/drakon.awk @@ -0,0 +1,15 @@ +# TyPe lIkE AnDoR DrAkOn fRoM AnCiEnT DoMaInS Of mYsTeRy +# <http://www.adomgb.info/adomgb-4.html> +{ + for (i = 1; i <= length($0); i++) { + c = substr($0, i, 1) + if (i % 2) { + c = tolower(c) + } + else { + c = toupper(c) + } + s = s c + } + print s +} |