Sub main()
Dim nu1(10),nu2(10),nu3(10),nu4(4)
Dim ruote(10),ruota(10)
Dim posta(10),poste(2),post(3)
poste(2)=1 : poste(2)=0.5 : post(3)=1.5
k=14
ruota(1)=11
fin=EstrazioneFin
ini=fin-300
For es=ini To fin
Messaggio es
For r1=1 To 11
If r1=11 Then r1=12
ruote(1)=r1
For p1=1 To 4
For p2=p1+1 To 5
n1=Estratto(es,r1,p1)
n2=Estratto(es,r1,p2) : ds1=Distanza(n1,n2)
If ds1=45 Then
a1=Massimo(n1,n2)
For r2=1 To 11
If r2=11 Then r2=12
ruote(2)=r2
For p3=1 To 5
n3=Estratto(es,r2,p3)
If Distanza (a1,n3)=30 And p1=p3 And n1>n2 Or Distanza (a1,n3)=30 And p2=p3 And n1<n2 Then
For r3=1 To 11
If r3=11 Then r3=12
ruote(3)=r3
For p4=1 To 5
n4=Estratto(es,r3,p4)
If Distanza(a1,n4)=15 And p1=p4 Or Distanza(a1,n4)=15 And p2=p4 Then
casi=casi+1
If n1>n2 Then h1=n1:H2=n2
If n1<n2 Then h1=n2:H2=n1
Scrivi String(75,"="),1
Scrivi DataEstrazione(es,1)&" < "&siglaRuota(r1)& " "& StringaEstratti(es,r1)&_
" > ambo distanza 45 < "&Format2(h1)&"."&Format2 (h2)&" Posizione "&Format2(p1)&"."&Format2 (p2)&" >"
Scrivi DataEstrazione(es,1)&" < "&siglARuota(r2)& " "& StringaEstratti(es,r2)&_
" > num. distanza 30 < "&Format2(n3)&" Posizione "&Format2(p3)&" >"
Scrivi DataEstrazione(es,1)&" < "&siglARuota(r3)& " "& StringaEstratti(es,r3)&_
" > num. distanza 15 < "&Format2(n4)&" Posizione "&Format2(p4)&" >"
Scrivi String(65,"-")&" caso n° "&(casi)
co=0
k1=Fuori90(n1+n2)
k2=Fuori90(n1+n3)
k3=Fuori90(n1+n4)
k4=Fuori90(n2+n3)
k5=Fuori90(n2+n4)
k6=Fuori90(n3+n4)
If k1=k2 Then b1=k1
If k1=k3 Then b1=k1
If k1=k4 Then b1=k1
If k1=k5 Then b1=k1
If k1=k6 Then b1=k1
If k2=k3 Then b1=k2
If k2=k4 Then b1=k2
If k2=k5 Then b1=k2
If k2=k6 Then b1=k2
If k3=k4 Then b1=k3
If k3=k5 Then b1=k3
If k3=k6 Then b1=k3
If k4=k5 Then b1=k4
If k4=k6 Then b1=k4
If k5=k6 Then b1=k5
nu1(1)=b1
posta(1)=1 : posta(p1+5)=1 : posta(p2+5)=1
co=co+1
ImpostaGiocata co,nu1,ruote,posta,k
Erase posta
nu3(1)=b1
nu3(2)=n1
co=co+1
ImpostaGiocata co,nu3,ruote,poste,k
co=co+1
ImpostaGiocata co,nu3,ruota,poste,k
nu3(1)=b1
nu3(2)=n2
co=co+1
ImpostaGiocata co,nu3,ruote,poste,k
co=co+1
ImpostaGiocata co,nu3,ruota,poste,k
nu3(1)=b1
nu3(2)=n3
co=co+1
ImpostaGiocata co,nu3,ruote,poste,k
co=co+1
ImpostaGiocata co,nu3,ruota,poste,k
nu3(1)=b1
nu3(2)=n4
co=co+1
ImpostaGiocata co,nu3,ruote,poste,k
co=co+1
ImpostaGiocata co,nu3,ruota,poste,k
nu2(1)=b1
nu2(2)=n1
nu2(3)=n2
nu2(4)=n3
nu2(5)=n4
co=co+1
ImpostaGiocata co,nu2,ruote,poste,k
nu2(1)=k1
nu2(2)=k2
nu2(3)=k3
nu2(4)=k4
nu2(5)=k5
nu2(6)=k6
co=co+1
ImpostaGiocata co,nu2,ruote,poste,k
Gioca es
End If
Next
Next
End If
Next
Next
End If
Next:Next:Next:next
ScriviResoconto
End Sub