aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-06-19 12:46:06 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-06-19 12:46:06 +1200
commit28249853f3c77c4f50b64b4f45c2d5a2c800c34f (patch)
treeabc6a0d3d2c0ab1a2a0a2f21eaf5fb747f50d684 /games
parentRemove user@ prefix from prompt (diff)
downloaddotfiles-28249853f3c77c4f50b64b4f45c2d5a2c800c34f.tar.gz
dotfiles-28249853f3c77c4f50b64b4f45c2d5a2c800c34f.zip
Clean up drakon(6df) a bit
Diffstat (limited to 'games')
-rw-r--r--games/drakon.awk16
1 files changed, 8 insertions, 8 deletions
diff --git a/games/drakon.awk b/games/drakon.awk
index b8d72888..ce619585 100644
--- a/games/drakon.awk
+++ b/games/drakon.awk
@@ -1,14 +1,14 @@
# TyPe lIkE AnDoR DrAkOn fRoM AnCiEnT DoMaInS Of mYsTeRy
# <http://www.adomgb.info/adomgb-4.html>
{
- len = length
- line = ""
- toggle = 0
+ len = length($0)
+ lin = ""
+ tog = 0
for (i = 1; i <= len; i++) {
- char = substr($0, i, 1)
- if (char ~ /[[:alpha:]]/)
- char = (toggle = !toggle) ? tolower(char) : toupper(char)
- line = line char
+ chr = substr($0, i, 1)
+ if (chr ~ /[[:alpha:]]/)
+ chr = (tog = !tog) ? tolower(chr) : toupper(chr)
+ lin = lin chr
}
- print line
+ print lin
}