Sakti
Advanced Member
Per cortesia, mi potreste spiegare perchè lo script mi raddoppia le giocate?
Se spiegate anche il perchè con una correzione vi ringrazio in anticipo...
Se spiegate anche il perchè con una correzione vi ringrazio in anticipo...
Sub Main()
Dim nu(10),ruote(12),poste(5)
poste(2)= 1
poste(3) = 1
fin = EstrazioneFin
ini = fin - 52
For es = ini To fin
For r1 = 1 To 12
For p1 = 1 To 4
For p2 = p1 + 1 To 5
n1 = Estratto(es,r1,p1)
n2 = Estratto(es,r1,p2)
For r2 = 1 To 12
n3 = Estratto(es,r2,p1)
n4 = Estratto(es,r2,p2)
ds1 = Distanza(n1,n3)
ds2 = Distanza(n2,n4)
If ds1 = 45 And ds2 = 45 Then
casi = casi + 1
ColoreTesto 1:Scrivi String(87,152)
Scrivi DataEstrazione(es,1) & " < " & SiglaRuota(r1) & " " & StringaEstratti(es,r1) & _
" > ambo distanza < " & Format2(ds1) & " >" & Format2(n1) & "." & Format2(n2) & " >"
Scrivi DataEstrazione(es,1) & " < " & SiglaRuota(r2) & " " & StringaEstratti(es,r2) & _
" > ambo distanza < " & Format2(ds2) & " >" & Format2(n3) & "." & Format2(n4) & " >"
ColoreTesto 1:Scrivi String(70,152) & " caso n° " &(casi)
ruote(1) = r1:ruote(2) = r2:ruote(3) = 11
k = 11
co = 0
nu(1) = 18
nu(2) = 26
nu(3) = 45
nu(4) = 90
ImpostaGiocata 1,nu,ruote,poste,k
Gioca es,1
co = co + 1
End If
Next:Next:Next
Next:Next
ScriviResoconto
End Sub
Dim nu(10),ruote(12),poste(5)
poste(2)= 1
poste(3) = 1
fin = EstrazioneFin
ini = fin - 52
For es = ini To fin
For r1 = 1 To 12
For p1 = 1 To 4
For p2 = p1 + 1 To 5
n1 = Estratto(es,r1,p1)
n2 = Estratto(es,r1,p2)
For r2 = 1 To 12
n3 = Estratto(es,r2,p1)
n4 = Estratto(es,r2,p2)
ds1 = Distanza(n1,n3)
ds2 = Distanza(n2,n4)
If ds1 = 45 And ds2 = 45 Then
casi = casi + 1
ColoreTesto 1:Scrivi String(87,152)
Scrivi DataEstrazione(es,1) & " < " & SiglaRuota(r1) & " " & StringaEstratti(es,r1) & _
" > ambo distanza < " & Format2(ds1) & " >" & Format2(n1) & "." & Format2(n2) & " >"
Scrivi DataEstrazione(es,1) & " < " & SiglaRuota(r2) & " " & StringaEstratti(es,r2) & _
" > ambo distanza < " & Format2(ds2) & " >" & Format2(n3) & "." & Format2(n4) & " >"
ColoreTesto 1:Scrivi String(70,152) & " caso n° " &(casi)
ruote(1) = r1:ruote(2) = r2:ruote(3) = 11
k = 11
co = 0
nu(1) = 18
nu(2) = 26
nu(3) = 45
nu(4) = 90
ImpostaGiocata 1,nu,ruote,poste,k
Gioca es,1
co = co + 1
End If
Next:Next:Next
Next:Next
ScriviResoconto
End Sub
Ultima modifica: