Sub Main()
Dim idEstr
Dim Inizio
Dim Fine
Dim ruote(10)
Dim ruota(1)
Dim posta(10)
Dim poste(10)
Dim r1
Dim r2
Dim p1
Dim p2
Dim p3
Dim p4
Dim nAnalisi
Dim nColpiDiGioco
Dim n(1)
Dim amb1(2)
Dim amb2(2)
Dim amb3(2)
Dim amb4(2)
Dim nu(5)
posta(1) = 1
poste(2) = 1
nAnalisi = CInt(InputBox(" Quante estrazioni vuoi controllare ? ",,"50"))
nColpiDiGioco = CInt(InputBox(" Per quanti colpi vuoi giocare ? ",,"12"))
Inizio = EstrazioneFin - nAnalisi
Fine = EstrazioneFin
co = 0
For idEstr = Inizio To Fine
Messaggio "elab. estr. [" &(idEstr) & "] di " & DataEstrazione(idEstr,1)
Call AvanzamentoElab(Inizio,Fine,idEstr)
'-----------------------------------------------
For r1 = 1 To 10
For r2 = r1 + 1 To 10
For p1 = 1 To 5
For p2 = p1 + 1 To 5
For p3 = 1 To 5
For p4 = p3 + 1 To 5
a = Estratto(idEstr,r1,p1)
b = Estratto(idEstr,r1,p2)
'-------------------------
'-------------------------
c = Estratto(idEstr,r2,p3)
d = Estratto(idEstr,r2,p4)
a1 = Trasposizione(a,b)
b1 = Trasposizione(b,a)
'--------------------------------------------------------
If c = a1 And d = b1 Or c = b1 And d = a1 Then
If a <> c Then
If a <> d Then
If b <> c Then
If b <> d Then
If a > 9 Then
If b > 9 Then
z1 = Massimo(a,b)
z2 = Massimo(c,d)
k1 = Fuori90(z1 + z2)
n(1) = k1
amb1(1) = n(1)
amb1(2) = a
amb2(1) = n(1)
amb2(2) = b
amb3(1) = n(1)
amb3(2) = c
amb4(1) = n(1)
amb4(2) = d
nu(1) = k1
nu(2) = a
nu(3) = b
nu(4) = c
nu(5) = d
'-----------------------------------------------
ruote(1) = r1
ruote(2) = r2
ruota(1) = 11
co = co + 1
Scrivi String(100,"°") & " Caso n°" & co,1
Scrivi DataEstrazione(idEstr) & " -- " & SiglaRuota(r1) & " - " & StringaEstratti(idEstr,r1) & " *** " & SiglaRuota(r2) & " - " & StringaEstratti(idEstr,r2),1
ColoreTesto 1
Scrivi "Ambi Trasposti : " & Format2(a) & " - " & Format2(b) & " " & " in " & p1 & "° e in " & p2 & "° pos." & " *** " & Format2(c) & " - " & Format2(d) & " " & " in " & p3 & "° e in " & p4 & "° pos.",1
Scrivi
Scrivi "Ambata : " & n(1),1
ReDim MatriceCaselleDaEvid(4,1)
MatriceCaselleDaEvid(1,0) = r1
MatriceCaselleDaEvid(1,1) = p1
MatriceCaselleDaEvid(2,0) = r1
MatriceCaselleDaEvid(2,1) = p2
MatriceCaselleDaEvid(3,0) = r2
MatriceCaselleDaEvid(3,1) = p3
MatriceCaselleDaEvid(4,0) = r2
MatriceCaselleDaEvid(4,1) = p4
Call DisegnaEstrazione(idEstr,MatriceCaselleDaEvid)
Scrivi String(80,"°"),1
ColoreTesto 0
ImpostaGiocata 1,n,ruote,posta,nColpiDiGioco,1
ImpostaGiocata 2,amb1,ruote,poste,nColpiDiGioco,2
ImpostaGiocata 3,amb2,ruote,poste,nColpiDiGioco,2
ImpostaGiocata 4,amb3,ruote,poste,nColpiDiGioco,2
ImpostaGiocata 5,amb4,ruote,poste,nColpiDiGioco,2
ImpostaGiocata 6,nu,ruote,poste,nColpiDiGioco,2
ImpostaGiocata 7,nu,ruota,poste,nColpiDiGioco,2
Gioca idEstr,1
End If
End If
End If
End If
End If
End If
End If
If ScriptInterrotto Then Exit For
Next
Next
Next
Next
Next
Next
Next
Scrivi
Scrivi String(100,"*")
ColoreTesto 2
Scrivi" casi trovati : " & co,1
ColoreTesto 0
Scrivi String(100," * ")
TestoInBandaPassante(" IDEA By Y10 <> LISTATO BY B A F F O B L U "),1,3,0
ScriviResoconto
End Sub