#171597 - 2006-12-16 05:28 AM
Announcement: New KiXgolf Tournament December 22 - January 7
|
Sealeopard
KiX Master
   
Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
|
A new KiXgolf Tournament will be held December 22 - January 7 on the KiXtart BBS at http://www.kixtart.org/forums
================================================================ KiXtart GOLF - How To Play ================================================================
Most importantly, anybody can play, no age restrictions, no penalties, no handicap!
The object in "real" golf is to hit the ball in the hole in the fewest strokes. The object in KiXtart Golf is to get from input (tee) to target (hole) in the fewest keystrokes.
Example: How many positive elements are in array $a?
Array $a could be of structure $a=[1, 2 ,-3, 4, -5, -7, 8, 9]
One approach:
for $b=0 to ubound($a)
if $a[$b]>0
$c=$c+1
endif
next
for a score of 45.
Another solution is:
DO
$b=$b+1
if $a[$b]>0
$c=$c+1
endif
UNTIL $b>(UBOUND($a)+1)
for a score of 53.
Better approach: Code sample 1
_________________________
There are two types of vessels, submarines and targets.
|
|
Top
|
|
|
|
#171607 - 2006-12-16 08:33 PM
Re: Announcement: New KiXgolf Tournament December 22 - January 7
[Re: Lonkero]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
|
|
Top
|
|
|
|
#171613 - 2006-12-16 10:06 PM
Re: Announcement: New KiXgolf Tournament December 22 - January 7
[Re: Benny69]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
I bid 23:
For Each $ in $a
$c=$c+($>0)
|
|
Top
|
|
|
|
#171618 - 2006-12-16 11:59 PM
Re: Announcement: New KiXgolf Tournament December 22 - January 7
[Re: Lonkero]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
|
|
Top
|
|
|
|
#171619 - 2006-12-17 02:35 AM
Re: Announcement: New KiXgolf Tournament December 22 - January 7
[Re: Benny69]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
Well since I seem to remember it being okay to rename the input variable this would make 21 
For Each $ in $
$c=$c+($>)
|
|
Top
|
|
|
|
#171620 - 2006-12-17 04:18 AM
Re: Announcement: New KiXgolf Tournament December 22 - January 7
[Re: Allen]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
|
|
Top
|
|
|
|
#171628 - 2006-12-17 06:41 AM
Re: Announcement: New KiXgolf Tournament December 22 - January 7
[Re: Lonkero]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
|
|
Top
|
|
|
|
#171629 - 2006-12-17 08:21 AM
Re: Announcement: New KiXgolf Tournament December 22 - January 7
[Re: Benny69]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
awwww... sour puss.
|
|
Top
|
|
|
|
#171754 - 2006-12-19 09:38 PM
Re: Announcement: New KiXgolf Tournament December 22 - January 7
[Re: Lonkero]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
KiXGolf is just as good of a reason to wake up as any other right?
|
|
Top
|
|
|
|
#171814 - 2006-12-20 04:28 PM
Re: Announcement: New KiXgolf Tournament December 22 - January 7
[Re: Björn]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
Bjorn, Jochen is right, you will love trying to figure out how to make it work. It is all about the fun and competition.
Get-er-Done!
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1662 anonymous users online.
|
|
|