CODICE
Sub main()
Dim amb(1),n(4),ab(5),num(2),nr(2),lg(5),ruote(2),ru1(1),ru2(1),posta(1),poste(5)
posta(1)=1:poste(2)=3:poste(3)=1:poste(4)=.40:poste(5)=.10
casi=0
ce=InputBox("Da quale estrazione vuoi controllare? ","F.F.",8260)
k=InputBox ("Per quanti colpi?","F.F.",14)
ini=ce
fin=EstrazioneFin
Scrivi "La Condizione Vincente per Ambata di Scaravetti x occhidigiada (script by F.F.)",1
Scrivi String(83,"="),1
Scrivi "resoconto da "&DataEstrazione(ini,1)&" a "&_
DataEstrazione(fin,1)&" ("&(fin-ce)&" estr.)",1
For es=ini To EstrazioneFin
Messaggio "elab. estr. ["&(es)&"] di "&DataEstrazione(es,1)
For r1= 1 To 9
For p1= 1 To 4 : p2= p1+1
a=Estratto(es,r1,p1):b=Estratto(es,r1,p2)
sx1=Fuori90 (a+b): dx1=Distanza (a,b)
For r2=r1+1 To 10
For p3=1 To 4: p4=p3+1
If p3=p1 And p4=p2 Then ' Inserire l'apice (') per non avere l'isotopia
c=Estratto(es,r2,p3):d=Estratto(es,r2,p4)
sx2=Fuori90 (c+d): dx2=Distanza (c,d)
If sx1=sx2 Or dx1=dx2 And c<>a And c<>b Then
If sx1=sx2 Then rg="Somma" : y=sx1 Else rg="Dist." : y=dx1
'Quadratura
so1=Fuori90(a+b):so2=Fuori90(c+d)
sv1=Fuori90(a+c):sv2=Fuori90(b+d)
sd1=Fuori90(a+d):sd2=Fuori90(b+c)
nc=Fuori90 (so1+so2)' Numero di ricerca
If so1=so2 Then ab(1)=so1:ab(2)=sv1:ab(3)=sv2:ab(4)=sd1:ab(5)=sd2
If sv1=sv2 Then ab(1)=sv1:ab(2)=so1:ab(3)=so2:ab(4)=sd1:ab(5)=sd2
If sd1=sd2 Then ab(1)=sd1:ab(2)=sv1:ab(3)=sv2:ab(4)=so1:ab(5)=so2
lg(1)=ab(1):lg(2)=ab(2):lg(3)=ab(3):lg(4)=ab(4):lg(5)=ab(5)
'Abbinamenti per l'ambo da cercare..
ru1(1)=r1 : ru2(1)=r2 : ok=0
ab(1)=so1:ab(2)=sv1:ab(3)=sd1:ab(4)=sd2
For j=0 To 10
num(1)=nc
For i=1 To 5
num(2)=ab(i)
If SerieFreq (es-j,es-j,num,ru1,2)>0 Then ok=1 :nr(1)=num(1):nr(2)=num(2):ex=es-j:ro=ru1(1)
If SerieFreq (es-j,es-j,num,ru2,2)>0 Then ok=1 :nr(1)=num(1):nr(2)=num(2):ex=es-j:ro=ru2(1)
If ok=1 Then Exit For
Next
If ok=1 Then Exit For
Next
If ok=1 Then
amb(1)=nr(1)
ruote(1)=r1:ruote(2)=r2
casi=casi+1:Scrivi String(85,"=")&" script by F.F.",1
Scrivi DataEstrazione(es,1)&" [ "&SiglaRuota(r1)&" - "&StringaEstratti(es,r1)&" ] [ "&_
Format2(a)&"."& Format2(b)&" "&rg&" "& Format2 (y)&" ] So1 "& Format2 (so1)&" Sv1 "& Format2 (sv1)&" Sd1 "& Format2 (sd1)&_
" in "&(p1)&"^/"&(p2)&"^ pos."
Scrivi DataEstrazione(es,1)&" [ "&SiglaRuota(r2)&" - "&StringaEstratti(es,r2)&" ] [ "&_
Format2(c)&"."& Format2(d)&" "&rg&" "& Format2 (y)&" ] So2 "& Format2 (so2)&" Sv2 "& Format2 (sv2)&" Sd2 "& Format2 (sd2)&_
" in "&(p3)&"^/"&(p4)&"^ pos."
Scrivi "Ambo di ricerca "& StringaNumeri (nr)&" è sortito il "& DataEstrazione (ex)&" su "& SiglaRuota (ro),1
Scrivi String(81,"-")&" caso n° "&(casi)
ImpostaGiocata 1,amb,ruote,posta,k,1
ImpostaGiocata 2,lg,ruote,poste,k,2
Gioca es
End If
End If
End If 'Mettere l'apice (') per la non isotopia
Next
Next
Next
Next
Next
ScriviResoconto
End Sub