#201122 - 2010-12-10 12:00 PM
Re: Kixgolf - Bowling Calculator - Public Round
[Re: Lonkero]
|
BradV
Seasoned Scripter
Registered: 2006-08-16
Posts: 686
Loc: Maryland, USA
|
Does anybody know J? I found this link early on, but couldn't understand it.
Bowling Calculations Using the J Language
|
Top
|
|
|
|
#201132 - 2010-12-12 05:23 PM
Re: Kixgolf - Bowling Calculator - Public Round
[Re: Lonkero]
|
Jochen
KiX Supporter
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
Ok, giving it up .. all I can get from the current 149 is one stroke more out of it for 150
function a($x)
dim $v, $b, $
while $x
$ = left($x,1)
$x = right($x,~)
if $>!
$v = ($=X^$="/")*10 + $ - ($="/")*$v
$a = $a + ($b+($b<2))*$v
$b = instr("/X",$)*($x<!) + $b/2
endfunction
Even with this one, only 150:
function a($)
dim $v, $b, $x, $c
while $
$x = left($,1)
$ = right($,~)
if $x>!
$c = instr("/X",$x)
$v = ($c>)*10 + $x - ($c=1)*$v
$a = $a + ($b+($b<2))*$v
$b = $c*($<!) + $b/2
endfunction
So I guess the 149 Version can't be optimized anymore. Well played Jooel, thumbs up!
_________________________
|
Top
|
|
|
|
#201134 - 2010-12-12 10:12 PM
Re: Kixgolf - Bowling Calculator - Public Round
[Re: Allen]
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4549
Loc: USA
|
|
Top
|
|
|
|
#201136 - 2010-12-13 12:22 AM
Re: Kixgolf - Bowling Calculator - Public Round
[Re: Lonkero]
|
ShaneEP
MM club member
Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
|
haha nice challenge Allen. Thanks for putting it together. And thanks Brad for not having enough time to bump me to last place!
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 700 anonymous users online.
|
|
|