aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/drakon.awk2
-rw-r--r--games/pks.awk4
2 files changed, 3 insertions, 3 deletions
diff --git a/games/drakon.awk b/games/drakon.awk
index ce619585..ebca4e95 100644
--- a/games/drakon.awk
+++ b/games/drakon.awk
@@ -6,7 +6,7 @@
tog = 0
for (i = 1; i <= len; i++) {
chr = substr($0, i, 1)
- if (chr ~ /[[:alpha:]]/)
+ if (chr ~ /[a-zA-Z]/)
chr = (tog = !tog) ? tolower(chr) : toupper(chr)
lin = lin chr
}
diff --git a/games/pks.awk b/games/pks.awk
index 06aad75f..028e471f 100644
--- a/games/pks.awk
+++ b/games/pks.awk
@@ -23,7 +23,7 @@ BEGIN {
# Iterate over the lines, randomly assigning the first field of each one with a
# decreasing probability; this method allows a single pass over the input,
# though it requires a lot of random numbers
-$1 ~ /[[:alpha:]]/ && rand() * ++n < 1 { wr = $1 }
+$1 ~ /[a-zA-Z]/ && rand() * ++n < 1 { wr = $1 }
# Ha, ha! Conclusion!
END {
@@ -33,7 +33,7 @@ END {
exit 1
# Strip trailing possessives and punctuation
- sub(/[^[:alpha:]]+s*$/, "", wr)
+ sub(/[^a-zA-Z]+s*$/, "", wr)
# Two or three "ha"s? Important decisions here folks
hr = int(rand()*2+1)