#183848 - 2007-12-18 01:38 PM
Re: KiXgolf 2007: Taunt Generator - Public Round
[Re: Jochen]
|
Jochen
KiX Supporter
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
Ah crap, if you win anyways and I shall not hold back score posts:
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{9 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',
'conspicuously{categorically{positively{cruelly{incontrovertibly'
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:36:45.546
Processing End = 2007/12/18 13:36:45.609
Duration = 0000/00/00 00:00:00.062
KiXGolf Score = 929
Thank you for participating in KiXtart Golf!
I don't like closing keywords anyway!
_________________________
|
Top
|
|
|
|
#183850 - 2007-12-18 01:50 PM
Re: KiXgolf 2007: Taunt Generator - Public Round
[Re: DrillSergeant]
|
Jochen
KiX Supporter
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
: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!
_________________________
|
Top
|
|
|
|
#183853 - 2007-12-18 02:16 PM
Re: KiXgolf 2007: Taunt Generator - Public Round
[Re: DrillSergeant]
|
DrillSergeant
MM club member
Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
|
You have to join C$ to a single line before testing it, but I didn't want to break the board layout:
begin a Generator ; ;! function a($) dim $!, $c, $t, $s[9], $g, $w, $h $c= split('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 ;! ;! ; end a Generator
Your solution passed all tests.
KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_tg.KIX
Computer OS = Windows XP Professional CPU = Intel(R) Pentium(R) 4 CPU 2.40GHz Speed = 2392 MHz Memory = 1016 MB
KiXGolf Scoring Engine Scoring Engine = 3.3
KiXtart Golf Score Tournament = Taunt Generator Processing Start = 2007/12/18 14:15:33.677 Processing End = 2007/12/18 14:15:34.058 Duration = 0000/00/00 00:00:00.380 KiXGolf Score = 912 Thank you for participating in KiXtart Golf!
Why I didn't come up with this during private round? I guess I was busy staring blindly at other parts....
Edited by DrillSergeant (2007-12-18 02:20 PM)
_________________________
The Code is out there
|
Top
|
|
|
|
#183854 - 2007-12-18 02:18 PM
Re: KiXgolf 2007: Taunt Generator - Public Round
[Re: DrillSergeant]
|
Jochen
KiX Supporter
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
Top
|
|
|
|
#183855 - 2007-12-18 02:22 PM
Re: KiXgolf 2007: Taunt Generator - Public Round
[Re: Jochen]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
I am going to be out of town most of the day so i will check back in later, mine doesn't stand up to your codes but here is my 1054:
Function a($)
Dim $c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m
$c = 'silly#wicked#sordid#naughty#repulsive#malodorous#ill-tempered'
$d = conspicuously#categorically#positively#cruelly#incontrovertibly
$e = was#personified
$f = 'is#masquerades as'
$g = Hamster#Coconut#Duck#Herring#Newt#Peril#Chicken#Vole#Parrot#Mouse#Twit
$h = mother#father#grandmother#grandfather#godfather
$i = 'steed#king#first-born'
$j = theholygrail
$k = #s#
For Each $ in $
Dim $n,$o,$p
For Each $n in Split($)
Dim $r
For $o = 1 to $n ^ 0
If SubStr($n,$o) > 'A'
$r = 1
EndIf
Next
$p = $p + $r
$=Join(Split($,' '))
Next
$n = $
Do
Dim $r
While $n
$o = Left($n,1)
If SubStr($j,($r^)+1,1) = $o
$r = $r + $o
EndIf
$n = Right($n,~)
Loop
$ = $+\Taunter:#
If $r = $j
$ = $+'(A childish hand gesture).'
Else
If z($k)
$ = $+z($g)+!#Your#+z($i)+#+z($f)+#a#
If $m
$ = $+z($d)+#
$d = y($d)
EndIf
$m = ~ $m
$ = $+z($c)
$c = y($c)
$g = y($g)
$i = y($i)
$f = y($f)
$p = $p - 3
Else
$ = $+Your#+z($h)+#+z($e)+#a
$h = y($h)
$e = y($e)
EndIf
$ = $+#+LCase(z($g))+'.'
$k = y($k)
$g = y($g)
EndIf
$p = $p - 3
Until $p < 1
$l = Join(Split($l+\Knight:#+$+\,#))
; Next
$a=Split(Right($l,~),\)
EndFunction
Function y($)
$y=Right($,($^)-(#+z($)^))+#+z($)
EndFunction
Function z($)
$z=Split($,#)[0]
EndFunction
Running Test 1...Result... Passed... Done Running Test 2...Result... Passed... Done Running Test 3...Result... Passed... Done Running Test 4...Result... Passed... Done Running Test 5...Result... Passed... Done
Your solution passed all tests
KiXtart KiXtart Version = 4.53 KiXGolf Script = kixgolf_tg.kix
Computer OS = Windows XP Professional CPU = Intel(R) Pentium(R) D CPU 3.20GHz Speed = 3200 MHz Memory = 2048 MB
KiXGolf Scoring Engine Scoring Engine = 3.3
KiXtart Golf Score Tournament = Taunt Generator Processing Start = 2007/12/18 07:20:56.048 Processing End = 2007/12/18 07:20:56.142 Duration = 0000/00/00 00:00:00.094 KiXGolf Score = 1054
Thank you for participating in KiXtart Golf! Press any key to continue...
|
Top
|
|
|
|
#183856 - 2007-12-18 02:24 PM
Re: KiXgolf 2007: Taunt Generator - Public Round
[Re: Jochen]
|
DrillSergeant
MM club member
Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
|
How's this for readability? :
; begin Taunt Generator
;
;!
function a($)
dim $!, $t, $s[9], $g, $w, $h
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(split('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',})[$],{)
$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
;!
;!
; end Taunt Generator
Your solution passed all tests
KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_tg.KIX
Computer OS = Windows XP Professional CPU = Intel(R) Pentium(R) 4 CPU 2.40GHz Speed = 2392 MHz Memory = 1016 MB
KiXGolf Scoring Engine Scoring Engine = 3.3
KiXtart Golf Score Tournament = Taunt Generator Processing Start = 2007/12/18 14:24:07.646 Processing End = 2007/12/18 14:24:07.806 Duration = 0000/00/00 00:00:00.159 KiXGolf Score = 904 Thank you for participating in KiXtart Golf!
_________________________
The Code is out there
|
Top
|
|
|
|
#183859 - 2007-12-18 02:33 PM
Re: KiXgolf 2007: Taunt Generator - Public Round
[Re: DrillSergeant]
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
function a($)
dim $!, $t, $s[9], $g, $w, $h
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(split('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',})[$],{)
$h = $t[$s[$]]
$w = left($w, $g-1) + iif($=5 & $g>1,lcase($h),$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.60 Beta 1 KiXGolf Script = kixgolf_tg.kix
Computer OS = Windows XP Professional CPU = Intel Pentium Model 13 Speed = 798 MHz Memory = 1014 MB
KiXGolf Scoring Engine Scoring Engine = 3.3
KiXtart Golf Score Tournament = Taunt Generator Processing Start = 2007/12/18 15:33:25.234 Processing End = 2007/12/18 15:33:25.421 Duration = 0000/00/00 00:00:00.187 KiXGolf Score = 901
_________________________
!download KiXnet
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 208 anonymous users online.
|
|
|