:p
function a($)
dim $!, $c, $t, $s[9], $g, $w, $h
$c= '1{5! 1{1', 'Your 4ther 7 a 2{Your 3 6 a 2{Your 4ther 7 a 5',
'5{8 5{5{9ly 8 5','steed{king{first-born','mo{fa{grandmo{grandfa{godfa',
'Hamster{Coconut{Duck{Herring{Newt{Peril{Chicken{Vole{Parrot{Mouse{Twit',
'is{masquerades as', 'was{personified',
'silly{wicked{sordid{naughty{repulsive{malodorous{ill-tempered',
'conspicuous{categorical{positive{cruel{incontrovertib'
for each $t in $
dim $d
$g = 'theholygrail'
for $ = 0 to 36
$t = join(split($t,' '))
next
for each $ in split($t)
$w=0
while $
$w = $w+($>'@')
$g = substr($g,(left($,1) = left($g,1))+1)
$ = right($, ~)
loop
$d = $d + ($w>)
next
$! = $! + '}Knight: ' + $t + iif($g,},'}Taunter: (A childish hand gesture).}')
$d = $d - 3*($g=)
while $d>0
$w = 0
for $ = 0 to 9
while instr($w, $)
$d = $d - 3*($=5)
$g = instr($w, $)
$t = split($c[$],{)
$h = $t[$s[$]]
if $=5 & $g>1 $h=lcase($h) endif
$w = left($w, $g-1) + $h + right($w, -$g)
$s[$] = ($s[$]+1) mod (ubound($t)+1)
loop
next
$! = $! + 'Taunter: ' + $w + '.}'
$a = split(right($!,~),})
endfunction
Your solution passed all tests
KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_tg.kix
Computer
OS = Windows 2000 Professional
CPU = Intel(R) Pentium(R) 4 CPU 2.80GHz
Speed = 2793 MHz
Memory = 504 MB
KiXGolf Scoring Engine
Scoring Engine = 3.3
KiXtart Golf Score
Tournament = Taunt Generator
Processing Start = 2007/12/18 13:49:31.531
Processing End = 2007/12/18 13:49:31.593
Duration = 0000/00/00 00:00:00.061
KiXGolf Score = 921
Thank you for participating in KiXtart Golf!