Saluti.
- Codice: Seleziona tutto
Sub main()
Dim poste (5)
Dim ruote (10)
Dim numeri(5)
Dim nr1(1)
Dim nr2(1)
Dim casi
Dim es
Dim r1
Dim e1
Dim e2
Dim n1
Dim n2
Dim d1
Dim vari
Dim variabile
casi=CLng( InputBox ("Quante estrazioni vuoi esaminare ?"))
vari=CLng(InputBox ("1-solo casi positivi 2-tutti "))
If vari=1 Then
variabile=True
Else
variabile=False
End If
For es= EstrazioneFin -casi To EstrazioneFin
For r1=1 To 11
If r1=11 Then r1=12
For e1=1 To 4
e2=e1+1
n1=Estratto (es,r1,e1)
n2=Estratto (es,r1,e2)
d1=Distanza(n1,n2)
If d1<8 Then
If n1>n2 Then
nr1(1)=Fuori90(n1+d1)
nr2(1)=n2-d1
If nr2(1)<1 Then nr2(1)=nr2(1)+90
Else
nr1(1)=Fuori90(n2+d1)
nr2(1)=n1-d1
If nr2(1)<1 Then nr2(1)=nr2(1)+90
End If
For r2=1 To 10
If r1<>r2 Then
ruote(1)=r2
If SerieFreq (es-7,es,nr1,ruote,1)>0 Then
es3=es+7
If es3=EstrazioneFin Then es3=EstrazioneFin
For es2= es+1 To es3
For e3=1 To 5
If Estratto (es2,r2,e3)=nr1(1) Then
Erase numeri
Erase poste
ruote(2)=r1
numeri(1)=nr1(1)
poste(2)=1
numeri(2)=n1
ImpostaGiocata 1,numeri,ruote,poste,8
pos= SerieFreq (es2+1,es2+8,numeri,ruote,2)
numeri(2)=n2
ImpostaGiocata 2,numeri,ruote,poste,8
If (SerieFreq (es2+1,es2+8,numeri,ruote,2)+pos)>0 And variabile=True Then scrivi"AMBO BASE "+CStr(n1)+" - "+CStr(n2)+" su "+NomeRuota (r1)+" e "+NomeRuota (r2)
If variabile=False Then scrivi"AMBO BASE "+CStr(n1)+" - "+CStr(n2)+" su "+NomeRuota (r1)+" e "+NomeRuota (r2)
Gioca es2,variabile
End If
Next
Next
End If
If SerieFreq (es-7,es,nr2,ruote,1)>0 Then
es3=es+7
If es3=EstrazioneFin Then es3=EstrazioneFin
For es2= es+1 To es3
For e3=1 To 5
If Estratto (es2,r2,e3)=nr2(1) Then
Erase numeri
Erase poste
ruote(2)=r1
numeri(1)=nr2(1)
poste(2)=1
numeri(2)=n1
ImpostaGiocata 1,numeri,ruote,poste,8
pos= SerieFreq (es2+1,es2+8,numeri,ruote,2)
numeri(2)=n2
ImpostaGiocata 2,numeri,ruote,poste,8
If (SerieFreq (es2+1,es2+8,numeri,ruote,2)+pos)>0 And variabile=True Then scrivi"AMBO BASE "+CStr(n1)+" - "+CStr(n2)+" su "+NomeRuota (r1)+" e "+NomeRuota (r2)
If variabile=False Then scrivi"AMBO BASE "+CStr(n1)+" - "+CStr(n2)+" su "+NomeRuota (r1)+" e "+NomeRuota (r2)
Gioca es2,variabile
End If
Next
Next
End If
End if
Next
End if
Next
Next
Next
ScriviResoconto
End Sub