CODICE
Sub main()
Dim nr(4),n(4)
Dim ruota(1),ruote(2),poste(2)
poste(2)=1
rs= CInt(InputBox("QUANTE ESTRAZIONI VUOI CONTROLLARE?","F.Florindi.",30))
If rs= False Then Exit Sub
cl= CInt(InputBox("QUANTI COLPI VUOI CONTROLLARE?","F.Florindi.",40))
If cl= False Then Exit Sub
For es = (EstrazioneFin - rs) To EstrazioneFin : Messaggio CStr(EstrazioneFin - es)
If es=EstrazioneFin Then Exit For
For r1=1 To 9 : For p=1 To 4 : For pp=p+1 To 5
a1=Estratto(es,r1,p) : a2=Estratto(es,r1,pp):d1=Distanza (a1,a2)
For r2=r1+1 To 10 : For q=1 To 4 : For qq=q+1 To 5
a3=Estratto(es,r2,q) : a4=Estratto(es,r2,qq):d2=Distanza (a3,a4)
If d1=d2 Then
'Formula per il coefficiente armonico di distanza
dd=d1 : dc=(90-2*dd)
If dc<4 Then dx=(dc+90)/4 Else dx=dc/4
If Int (dx)=dx Then d3=dx : d4=Fuori90 (d3*3) Else d3=(90-(2*dd+90))/4 : d4=Fuori90 (d3*3)
dv1=Distanza (a1,a3) : dv2=Distanza (a2,a4)
dd1=Distanza (a1,a4) : dd2=Distanza (a2,a3)
If dv1<>dv2 Or dd1<>dd2 Then
If d3=dv1 And dv2=d4 Or d3=dv2 And dv1=d4 Or d3=dd1 And dd2=d4 Or d3=dd2 And dd1=d4 Then
n(1)=a1 : n(2)=a2 : n(3)=a3 : n(4)=a4
OrdinaMatrice n
'Quadratura distanze
xo1=Distanza (n(1),n(2)) : xo2=Distanza (n(3),n(4))
xv1=Distanza (n(1),n(4)) : xv2=Distanza (n(2),n(3))
If d3=xo1 And d4=xo2 Then k=d3 : nr(1)=Fuori90 (n(3)+k) : nr(2)=Fuori90 (n(4)+90-k)
If d3=xo2 And d4=xo1 Then k=d3 : nr(1)=Fuori90 (n(1)+k) : nr(2)=Fuori90 (n(2)+90-k)
If d3=xv1 And d4=xv2 Then k=d3 : nr(1)=Fuori90 (n(2)+k) : nr(2)=Fuori90 (n(3)+90-k)
If d3=xv2 And d4=xv1 Then k=d3 : nr(1)=Fuori90 (n(4)+k) : nr(2)=Fuori90 (n(1)+90-k)
nr(3)=Diametrale (nr(1)) : nr(4)=Diametrale (nr(2))
cont=cont+1
ColoreTesto 2 : Scrivi String(40,32)&" Pronostico n° " &cont&"",1
ColoreTesto 0 : Scrivi
Scrivi String(118,164)
Scrivi DataEstrazione(es,1)&""&Space(3)&"["&(es)&"]ª"&Space(4)&""&_
SiglaRuota(r1)&""&Space(3)&""& StringaEstratti (es,r1)&_
Space(4)&""& Format2(a1)&" "& Format2 (a2)&" "& " Do1. "& Format2 (d1)&space(3)&_
"[ Dv1. "& Format2 (dv1)& " Dd1. "& Format2 (dd1)&"] (Pos."&Space(1)&""&p&"°-"&""&pp&"°)"& " Coif. armonico "& Format2 (d3),1
Scrivi DataEstrazione(es,1)&""&Space(3)&"["&(es)&"]ª"&Space(4)&""&_
SiglaRuota (r2)&""&Space(3)&""& StringaEstratti (es,r2)&_
Space(4)&""& Format2(a3)&" "& Format2 (a4)&" "& " Do2. "& Format2 (d2)&Space(3)&_
"[ Dv2. "& Format2 (dv2)& " Dd2. "& Format2 (dd2)&"] (Pos."&Space(1)&""&q&"°-"&""&qq&"°)"& " Coif. armonico "& Format2 (d3),1
Scrivi String(118,164): Scrivi
ruote(1)=r1
ruote(2)=r2
ruota(1)=11
ImpostaGiocata 1,nr,ruote,poste,cl,2
ImpostaGiocata 2,nr,ruota,poste,cl,2
Gioca es
Scrivi String(118,151)
End If
End If
End If
Next : Next : Next
Next : Next : Next
Next
ScriviResoconto
ColoreTesto 2
Scrivi "Metodo dal Quadrato all'Esagono_Antonio Longo_listato da Franco Florindi",1
End Sub