aboutsummaryrefslogtreecommitdiff
path: root/games/drakon.awk
blob: 5d73f74d73615cd3af79283f590a2fb3455b0c6a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
}