Page 2 of 3 <123>
Topic Options
#201100 - 2010-12-08 11:19 AM Re: Kixgolf - Bowling Calculator - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
... and completely unnecessary

Kixgolf Score = 151

 Code:
function a($x)
    dim $v, $b, $
    while $x
        $ = left($x,1)
        $x = right($x,~)
        if $>!
            $v = ($=X)*10 + $ + ($="/")*(10-$v)
            $a = $a + ($b+($b<2))*$v
            $b = ($b>1) + instr("/X",$)*($x<!)
endfunction
_________________________



Top
#201101 - 2010-12-08 12:40 PM Re: Kixgolf - Bowling Calculator - Public Round [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
wohoo!
I tried something similar but you got it working! way to go!!!!
_________________________
!

download KiXnet

Top
#201104 - 2010-12-08 09:45 PM Re: Kixgolf - Bowling Calculator - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
well...
how about 149?
 Code:
function a($x)
    dim $v, $b, $
    while $x
        $ = left($x,1)
        $x = right($x,~)
        if $>!
            $v = ($=X)*10 + $ + ($="/")*(10-$v)
            $a = $a + ($b+($b<2))*$v
            $b = instr("/X",$)*($x<!) + $b/2
endfunction
_________________________
!

download KiXnet

Top
#201106 - 2010-12-09 08:08 AM Re: Kixgolf - Bowling Calculator - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
hehe, yeah,
quite obvious
_________________________



Top
#201116 - 2010-12-09 08:24 PM Re: Kixgolf - Bowling Calculator - Public Round [Re: Allen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
 Originally Posted By: Allen
Please post your code...


When does it end? Countdown clock?
_________________________



Top
#201117 - 2010-12-09 09:28 PM Re: Kixgolf - Bowling Calculator - Public Round [Re: Jochen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4520
Loc: USA
Ey Ey Capitan...


Top
#201118 - 2010-12-09 09:36 PM Re: Kixgolf - Bowling Calculator - Public Round [Re: Allen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Brain hurts big time ...
_________________________



Top
#201119 - 2010-12-10 12:41 AM Re: Kixgolf - Bowling Calculator - Public Round [Re: Jochen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4520
Loc: USA
Curious... anyone try to do it with 30 pins as a max per frame and subtract accordingly?
Top
#201120 - 2010-12-10 07:33 AM Re: Kixgolf - Bowling Calculator - Public Round [Re: Allen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
you mean:

 Code:
pseudo:
$a = $a + 30 - overly complicated calculations


nope, didn't even thought of that.. Would be curious too to see how much we can get those down to current scores if possible anyway.
_________________________



Top
#201121 - 2010-12-10 08:01 AM Re: Kixgolf - Bowling Calculator - Public Round [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
executioner has spoken \:\)

thought about it (now, never before) and it seems to still follow the exact same logic. need to play with "/" is the hardest part of the task \:\)
_________________________
!

download KiXnet

Top
#201122 - 2010-12-10 12:00 PM Re: Kixgolf - Bowling Calculator - Public Round [Re: Lonkero]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 684
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
#201124 - 2010-12-10 03:05 PM Re: Kixgolf - Bowling Calculator - Public Round [Re: BradV]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
J is a bit cryptic,
but if we would Golf in J our scores were way lower
_________________________



Top
#201126 - 2010-12-10 09:41 PM Re: Kixgolf - Bowling Calculator - Public Round [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
doubt it :P
there are already 2 J's involved in this one \:\)
_________________________
!

download KiXnet

Top
#201132 - 2010-12-12 05:23 PM Re: Kixgolf - Bowling Calculator - Public Round [Re: Lonkero]
Jochen Administrator Offline
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


 Code:
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:

 Code:
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
#201133 - 2010-12-12 06:03 PM Re: Kixgolf - Bowling Calculator - Public Round [Re: Jochen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4520
Loc: USA
I guess that is it. Congrats guys. I'll put up the score in a bit.
Top
#201134 - 2010-12-12 10:12 PM Re: Kixgolf - Bowling Calculator - Public Round [Re: Allen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4520
Loc: USA
Private Round Scoring				
			Particip.	
Name	Score	Points	Points	Total
Jochen	155	5	1	6
Maciep	156	4	1	5	
Jooel	181	3	1	4	
Citrix	265	2	1	3
BradV	417	1	1	2
 
 
Public Round Scoring Bonus Name Score Points Points Total Jooel 149 5 1 6 Jochen 150 4 1 5 Maciep 156 3 0 3 Citrix 265 2 0 2 BradV 417 1 0 1
Final Scoring Jochen 11 Jooel 10 Maciep 8 Citrix 5 BradV 3

Top
#201135 - 2010-12-12 10:41 PM Re: Kixgolf - Bowling Calculator - Public Round [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
I am gonna pout now \:\(
_________________________
!

download KiXnet

Top
#201136 - 2010-12-13 12:22 AM Re: Kixgolf - Bowling Calculator - Public Round [Re: Lonkero]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2100
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
#201137 - 2010-12-13 02:08 AM Re: Kixgolf - Bowling Calculator - Public Round [Re: ShaneEP]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
yea, thanks Allen!
_________________________
!

download KiXnet

Top
#201140 - 2010-12-13 07:39 AM Re: Kixgolf - Bowling Calculator - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Yeah mate,
this was really great, when's the next? ;\)
_________________________



Top
Page 2 of 3 <123>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 285 anonymous users online.
Newest Members
Praveer, Ollero, rayyo, Foxlicht, DonChild
17742 Registered Users

Generated in 0.097 seconds in which 0.064 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org