Gargoyle
MM club member
   
Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
|
Well for my blindness to the ball - KiXGolf Score = 481
; begin Linear Pachinko ; ;! Function a($) Dim $l,$c,$v,$t,$w
For $l = 1 to Len($) $c = M($,$l)
Select Case $c = "." $v = 100 Case $c = "|" $v = (B($,$l,1) + C($,$l,1)) / 2 Case $c = "/" $v = B($,$l,1) Case $c = "\" $v = c($,$l,1) Case 1 $v = 0 EndSelect
$t = $t + $v
Next
$a = $t / len($)
EndFunction
Function M($,$r) $m = substr($,$r,1) EndFunction
Function b($,$l,$z) Dim $y
$y = M($,$l - $z) While $y = "_" $z = $z + 1 $y = M($,$l - $z) Loop If $y = "." | $l - $z = 0 $b = 100 Else $b = 0
endFunction
Function c($,$l,$z) Dim $x
$x = M($,$l + $z) While $x = "_" $z = $z + 1 $x = M($,$l + $z) Loop If $x = "." | $l + $z > Len($) $c = 100 Else $c = 0
EndFunction
;! ;! ; end Linear Pachinko
_________________________
Today is the tomorrow you worried about yesterday.
|