Subversion Repositories wimsdev

Rev

Rev 23 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed


!read $deffile final
!if $speculate=yes
 thisscore=0
 !exit
!endif

!for i=1 to $anscnt
 !if ?? isin $(ans$i) or $(ans$i)=$empty
  partial=yes
  thisscore=0
  !exit
 !endif
!next i

n_=!itemcnt $gotlist
!for i=1 to $parmcnt
 !if $(weight$i)>1 and $i notitemof $gotlist
  speculate=yes
  thisscore=0
  !exit
 !endif
!next i
t_=0
!for i in $gotlist
 !if $(weight$i)<=0
  !advance t_
 !endif
!next i
!if $n_-$t_<$minask
 speculate=yes
 thisscore=0
 !exit
!endif

uselesscnt=0
!for i in $gotlist
 !if $(weight$i)<=0
  l=!line 1 of $(parm$i)
  useless=!append item $l to $useless
  !advance uselesscnt
 !endif
!next i
useless=!replace , by , $ in $useless

gotcnt=!itemcnt $gotlist
!if $thisscore>0 and $gotcnt>$minask
 thisscore=$[$thisscore*$scorepower^($gotcnt-$minask+$uselesscnt)]
!endif