Sub Main
Dim nu(2),ru(1),n1(1),f1(5),nn(1),anum(1)
Ini = EstrazioneFin - 10
fin = EstrazioneFin
For es = Ini To fin
For r1 = 1 To 10
For p1 = 1 To 5
For p2 = p1 + 1 To 5
a = Estratto(es,r1,p1)
b = Estratto(es,r1,p2)
If Decina(a) = Decina(b) Then
If Differenza(a,b) = 3 Or Differenza(a,b) = 6 Then
nu(1) = a
nu(2) = b
ru(1) = r1
aa = Massimo(a,b)
bb = Minimo(a,b)
If Differenza(aa,bb) = 3 Then n1(1) = bb + 6
If Differenza(aa,bb) = 6 Then n1(1) = bb + 3
If Decina(n1(1)) <> Decina(a) Then n1(1) = n1(1) - 9
'-------------------------------------
For x = 1 To 5
f1(x) = Figura(Estratto(es,r1,x))
Next
'-------------------------------------
If n1(1) = 1 Or n1(1) = 4 Or n1(1) = 7 Then nn(1) = 33
If n1(1) = 31 Or n1(1) = 34 Or n1(1) = 37 Then nn(1) = 9
If n1(1) = 61 Or n1(1) = 64 Or n1(1) = 67 Then nn(1) = 66
If n1(1) = 2 Or n1(1) = 5 Or n1(1) = 8 Then nn(1) = 66
If n1(1) = 32 Or n1(1) = 35 Or n1(1) = 38 Then nn(1) = 33
If n1(1) = 62 Or n1(1) = 65 Or n1(1) = 68 Then nn(1) = 9
If n1(1) = 3 Or n1(1) = 6 Or n1(1) = 9 Then nn(1) = 9
If n1(1) = 33 Or n1(1) = 36 Or n1(1) = 39 Then nn(1) = 66
If n1(1) = 63 Or n1(1) = 66 Or n1(1) = 69 Then nn(1) = 33
If n1(1) = 3 Or n1(1) = 6 Or n1(1) = 9 Then nn(1) = 9
If n1(1) = 33 Or n1(1) = 36 Or n1(1) = 39 Then nn(1) = 66
If n1(1) = 63 Or n1(1) = 66 Or n1(1) = 69 Then nn(1) = 33
If n1(1) = 10 Or n1(1) = 41 Or n1(1) = 72 Then nn(1) = 22
If n1(1) = 40 Or n1(1) = 71 Or n1(1) = 77 Then nn(1) = 88
If n1(1) = 70 Or n1(1) = 73 Or n1(1) = 76 Then nn(1) = 55
If n1(1) = 11 Or n1(1) = 42 Or n1(1) = 73 Then nn(1) = 55
If n1(1) = 12 Or n1(1) = 43 Or n1(1) = 74 Then nn(1) = 88
If n1(1) = 13 Or n1(1) = 44 Or n1(1) = 75 Then nn(1) = 22
If n1(1) = 14 Or n1(1) = 45 Or n1(1) = 76 Then nn(1) = 55
If n1(1) = 15 Or n1(1) = 46 Or n1(1) = 77 Then nn(1) = 88
If n1(1) = 16 Or n1(1) = 47 Or n1(1) = 78 Then nn(1) = 22
If n1(1) = 17 Or n1(1) = 48 Or n1(1) = 79 Then nn(1) = 55
If n1(1) = 18 Or n1(1) = 49 Or n1(1) = 40 Then nn(1) = 88
If n1(1) = 19 Then nn(1) = 22
If n1(1) = 20 Then nn(1) = 44
If n1(1) = 21 Then nn(1) = 77
'.... continuare inserimento.......
'-------- fine inserimento................
smF = f1(1) + f1(2) + f1(3) + f1(4) + f1(5)
Scrivi GetInfoEstrazione(es) & vbTab,0,0
Scrivi SiglaRuota(r1) & vbTab & StringaEstratti(es,r1) & vbTab & StringaNumeri(f1) & vbTab & " SmF = " & smF & vbTab,0,0
Scrivi StringaNumeri(nu,,1) & vbTab & StringaNumeri(n1,,1),0,0
Scrivi vbTab & StringaNumeri(nn,1),1,0
pir = Format2(n1(1)) & Format2(smf) & Format2(nn(1))
Scrivi vbTab & pir,0,0
pira = Piramide(pir,4,2)
anum(1) = pira
Call VerificaEsitoTurbo(anum,ru,es + 1,1,10,,esito,clp,estratti,Id)
Scrivi vbTab & pira,1,0,,1,2
If esito <> "" Then Scrivi vbTab & estratti & " Colpo " & clp
If esito = "" Then Scrivi " ................................"
End If
End If
Next
Next
Next
Next
End Sub