Subversion Repositories wimsdev

Rev

Rev 546 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
 
2
!read $deffile final
3
!if $speculate=yes
15353 bpr 4
  thisscore=0
5
  !exit
23 reyssat 6
!endif
7
 
8
!for i=1 to $anscnt
15353 bpr 9
  !if ?? isin $(ans$i) or $(ans$i)=$empty
10
    partial=yes
11
    thisscore=0
12
    !exit
13
  !endif
23 reyssat 14
!next i
15
 
16
n_=!itemcnt $gotlist
17
!for i=1 to $parmcnt
15353 bpr 18
  !if $(weight$i)>1 and $i notitemof $gotlist
19
    speculate=yes
20
    thisscore=0
21
    !exit
22
  !endif
23 reyssat 23
!next i
24
t_=0
25
!for i in $gotlist
15353 bpr 26
  !if $(weight$i)<=0
27
    !advance t_
28
  !endif
23 reyssat 29
!next i
30
!if $n_-$t_<$minask
15353 bpr 31
  speculate=yes
32
  thisscore=0
33
  !exit
23 reyssat 34
!endif
35
 
36
uselesscnt=0
37
!for i in $gotlist
15353 bpr 38
  !if $(weight$i)<=0
39
    l=!line 1 of $(parm$i)
40
    useless=!append item $l to $useless
41
    !advance uselesscnt
42
  !endif
23 reyssat 43
!next i
44
useless=!replace , by , $ in $useless
45
 
46
gotcnt=!itemcnt $gotlist
47
!if $thisscore>0 and $gotcnt>$minask
15353 bpr 48
  thisscore=$[$thisscore*$scorepower^($gotcnt-$minask+$uselesscnt)]
23 reyssat 49
!endif