Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature may not be available in some browsers.
Matematico;n2160484 ha scritto:Ciao Duplex, se non posti il metodo originale la vedo dura!
Sub Main()
Dim ruote(2)
Dim ruota(1)
Dim posta(2)
Dim poste(2)
Dim nn(2),nr1(2),nr2(2),nr3(2)
'Ambo relativo.di O. Manara & modificato da Florindi.
posta(1) = 1
posta(2) = 1
poste(2) = 1
Scrivi
Scrivi
ColoreTesto 2
Scrivi String(40,"=") & "****** L'AMBO RELATIVO CON I SEGNI DISTANZIALI ****** ",1
ColoreTesto 0
Scrivi
Scrivi
ColoreTesto 1
Scrivi String(70,"=") & "Listato da Patrik e Franco Florindi ",1
ColoreTesto 0
fin = EstrazioneFin
ini = fin - 20
t = 0
For es = ini To fin
AvanzamentoElab ini,fin,es
For r = 1 To 9 : For p1 = 1 To 5 : p2 = p1 + 1
If p2 = 6 Then p2 = 1
a = Estratto(es - 5,r,p1) : b = Estratto(es - 5,r,p2)
do1 = Distanza(a,b)
For rr = r + 1 To 10 : For p3 = 1 To 5 : p4 = p3 + 1
If p4 = 6 Then p4 = 1
c = Estratto(es - 5,rr,p3) : d = Estratto(es - 5,rr,p4)
do2 = Distanza(c,d)
If do1 = do2 Then
'Distanza Verticale
dv1 = Distanza(a,c) : dv2 = Distanza(b,d)
If dv1 <> dv2 Then
nr1(1) = Diametrale(dv1): nr1(2) = Diametrale(dv2)
nr2(1) = Diametrale(a) : nr2(2) = Diametrale(c)
nr3(1) = Diametrale(b) : nr3(2) = Diametrale(d)
'Cerca gli ambi derivati entro 5 colpi.
ok = 0:co = 0
For ex = es - 4 To es
For r2 = 1 To 12
For p5 = 1 To 5 : p6 = p5 + 1
If p6 = 6 Then p6 = 1
x1 = Estratto(ex,r2,p5) : x2 = Estratto(ex,r2,p6)
If((x1 = nr1(1) And x2 = nr1(2)) Or(x1 = nr1(2) And x2 = nr1(1))) Or((x1 = nr2(1) And x2 = nr2(2)) Or(x1 = nr2(2) And x2 = nr2(1))) Or((x1 = nr3(1) And x2 = nr3(2)) Or(x1 = nr3(2) And x2 = nr3(1)))Then
If(x1 = nr1(1) And x2 = nr1(2)) Or(x1 = nr1(2) And x2 = nr1(1)) Then nn(1) = x1 : nn(2) = x2
If(x1 = nr2(1) And x2 = nr2(2)) Or(x1 = nr2(2) And x2 = nr2(1)) Then nn(1) = x1 : nn(2) = x2
If(x1 = nr3(1) And x2 = nr3(2)) Or(x1 = nr3(2) And x2 = nr3(1)) Then nn(1) = x1 : nn(2) = x2
'Controlla i segni distanziali
df1 = Abs(a - b) : df2 = Abs(c - d) : df3 = Abs(nn(1) - nn(2))
If df1 > 45 And a > b Then k1 = "+"
If df1 > 45 And a < b Then k1 = "-"
If df1 <= 45 And a > b Then k1 = "-"
If df1 <= 45 And a < b Then k1 = "+"
If df2 > 45 And c > d Then k2 = "+"
If df2 > 45 And c < d Then k2 = "-"
If df2 <= 45 And c > d Then k2 = "-"
If df2 <= 45 And c < d Then k2 = "+"
If df3 > 45 And nn(1) > nn(2) Then k3 = "+"
If df3 > 45 And nn(1) < nn(2) Then k3 = "-"
If df3 <= 45 And nn(1) > nn(2) Then K3 = "-"
If df3 <= 45 And nn(1) < nn(2) Then k3 = "+"
If k1 = "-" And K2 = "-" And K3 = "+" Or k1 = "-" And K2 = "+" And K3 = "+" Or k1 = "+" And K2 = "-" And K3 = "-" Or k1 = "+" And K2 = "+" And K3 = "-" Then
t = t + 1 : ok = 1 : co = co + 1
ruota(1) = r2
ruote(1) = 11
ruote(2) = 12
Scrivi "-------------------------------------------------------------------------"
Scrivi "Estrazione " & DataEstrazione(es - 5),1
Scrivi SiglaRuota(r) & "" & Format2(a) & "." & Format2(b) & " [Pos. " & p1 & "/" & p2 & "] Do1. " & Format2(do1) & " Dv1. " & Format2(dv1),1
Scrivi SiglaRuota(rr) & "" & Format2(c) & "." & Format2(d) & " [Pos. " & p3 & "/" & p4 & "] Do2. " & Format2(do2) & " Dv2. " & Format2(dv2),1
ColoreTesto 1
Scrivi
Scrivi "Ambi Derivati: " & StringaNumeri(nr1) & " / " & StringaNumeri(nr2) & " / " & StringaNumeri(nr3)
ColoreTesto 0
ColoreTesto 2
Scrivi "Ambo trovato su " & SiglaRuota(r2) & " il " & DataEstrazione(ex) & " Colpo " & co & "‹ " & StringaNumeri(nn) & " [Pos. " & p5 & "/" & p6 & "]",1
ColoreTesto 0
Scrivi
Scrivi "Ambi sortiti per determinare i segni distanziali: " & "" & Format2(a) & "." & Format2(b) & _
" / " & Format2(c) & "." & Format2(d) & " / " & Format2(nn(1)) & "." & Format2(nn(2)),1
Scrivi "Segni Distanziali : " & K1 & "/" & K2 & "/" & K3,1
Scrivi "----------------------------------------------------------------Giocata n‹" & t
ImpostaGiocata 1,nn,ruota,posta,18,1
ImpostaGiocata 2,nn,ruote,poste,18,2
Gioca ex
End If
End If : Next : Next
co = co + 1
If ok = 1 Then Exit For
Next
End If
End If
Next
Next
Next
Next
Next
ScriviResoconto
End Sub
[TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 892"]
[TR]
[TD="width: 1189"]Sub Main()[/TD]
[/TR]
[TR]
[TD] [/TD]
[/TR]
[TR]
[TD]Dim ruote(2)[/TD]
[/TR]
[TR]
[TD]Dim ruota(1)[/TD]
[/TR]
[TR]
[TD]Dim posta(2)[/TD]
[/TR]
[TR]
[TD]Dim poste(2)[/TD]
[/TR]
[TR]
[TD]Dim nn(2),nr1(2),nr2(2),nr3(2)[/TD]
[/TR]
[TR]
[TD]'Ambo relativo.di O. Manara & modificato da Florindi.[/TD]
[/TR]
[TR]
[TD]posta(1) = 1[/TD]
[/TR]
[TR]
[TD]posta(2) = 1[/TD]
[/TR]
[TR]
[TD]poste(2) = 1[/TD]
[/TR]
[TR]
[TD]Scrivi[/TD]
[/TR]
[TR]
[TD]Scrivi[/TD]
[/TR]
[TR]
[TD]ColoreTesto 2[/TD]
[/TR]
[TR]
[TD]Scrivi String(40,"=") & "****** L'AMBO RELATIVO CON I SEGNI DISTANZIALI ****** ",1[/TD]
[/TR]
[TR]
[TD]ColoreTesto 0[/TD]
[/TR]
[TR]
[TD]Scrivi[/TD]
[/TR]
[TR]
[TD]Scrivi[/TD]
[/TR]
[TR]
[TD]ColoreTesto 1[/TD]
[/TR]
[TR]
[TD]Scrivi String(70,"=") & "Listato da Patrik e Franco Florindi ",1[/TD]
[/TR]
[TR]
[TD]ColoreTesto 0[/TD]
[/TR]
[TR]
[TD]fin = EstrazioneFin[/TD]
[/TR]
[TR]
[TD]ini = fin - 20[/TD]
[/TR]
[TR]
[TD]t = 0[/TD]
[/TR]
[TR]
[TD]For es = ini To fin[/TD]
[/TR]
[TR]
[TD] AvanzamentoElab ini,fin,es[/TD]
[/TR]
[TR]
[TD] For r = 1 To 9 : For p1 = 1 To 5 : p2 = p1 + 1[/TD]
[/TR]
[TR]
[TD] If p2 = 6 Then p2 = 1[/TD]
[/TR]
[TR]
[TD] a = Estratto(es - 5,r,p1) : b = Estratto(es - 5,r,p2)[/TD]
[/TR]
[TR]
[TD] do1 = Distanza(a,b)[/TD]
[/TR]
[TR]
[TD] For rr = r + 1 To 10 : For p3 = 1 To 5 : p4 = p3 + 1[/TD]
[/TR]
[TR]
[TD] If p4 = 6 Then p4 = 1[/TD]
[/TR]
[TR]
[TD] c = Estratto(es - 5,rr,p3) : d = Estratto(es - 5,rr,p4)[/TD]
[/TR]
[TR]
[TD] do2 = Distanza(c,d)[/TD]
[/TR]
[TR]
[TD] If do1 = do2 Then[/TD]
[/TR]
[TR]
[TD] 'Distanza Verticale[/TD]
[/TR]
[TR]
[TD] dv1 = Distanza(a,c) : dv2 = Distanza(b,d)[/TD]
[/TR]
[TR]
[TD] If dv1 <> dv2 Then[/TD]
[/TR]
[TR]
[TD] nr1(1) = Diametrale(dv1): nr1(2) = Diametrale(dv2)[/TD]
[/TR]
[TR]
[TD] nr2(1) = Diametrale(a) : nr2(2) = Diametrale(c)[/TD]
[/TR]
[TR]
[TD] nr3(1) = Diametrale(b) : nr3(2) = Diametrale(d)[/TD]
[/TR]
[TR]
[TD] 'Cerca gli ambi derivati entro 5 colpi.[/TD]
[/TR]
[TR]
[TD] ok = 0:co = 0[/TD]
[/TR]
[TR]
[TD] For ex = es - 4 To es[/TD]
[/TR]
[TR]
[TD] For r2 = 1 To 12[/TD]
[/TR]
[TR]
[TD] For p5 = 1 To 5 : p6 = p5 + 1[/TD]
[/TR]
[TR]
[TD] If p6 = 6 Then p6 = 1[/TD]
[/TR]
[TR]
[TD] x1 = Estratto(ex,r2,p5) : x2 = Estratto(ex,r2,p6)[/TD]
[/TR]
[TR]
[TD] If((x1 = nr1(1) And x2 = nr1(2)) Or(x1 = nr1(2) And x2 = nr1(1))) Or((x1 = nr2(1) And x2 = nr2(2)) Or(x1 = nr2(2) And x2 = nr2(1))) Or((x1 = nr3(1) And x2 = nr3(2)) Or(x1 = nr3(2) And x2 = nr3(1)))Then[/TD]
[/TR]
[TR]
[TD] If(x1 = nr1(1) And x2 = nr1(2)) Or(x1 = nr1(2) And x2 = nr1(1)) Then nn(1) = x1 : nn(2) = x2[/TD]
[/TR]
[TR]
[TD] If(x1 = nr2(1) And x2 = nr2(2)) Or(x1 = nr2(2) And x2 = nr2(1)) Then nn(1) = x1 : nn(2) = x2[/TD]
[/TR]
[TR]
[TD] If(x1 = nr3(1) And x2 = nr3(2)) Or(x1 = nr3(2) And x2 = nr3(1)) Then nn(1) = x1 : nn(2) = x2[/TD]
[/TR]
[TR]
[TD] 'Controlla i segni distanziali[/TD]
[/TR]
[TR]
[TD] df1 = Fuori90 (90 + (a - b)) : df2 = Fuori90 (90 + (c - d)) : df3 = Fuori90 (90 + (nn(1) - nn(2)))[/TD]
[/TR]
[TR]
[TD] If df1 > 45 And a > b Then k1 = "+"[/TD]
[/TR]
[TR]
[TD] If df1 > 45 And a < b Then k1 = "-"[/TD]
[/TR]
[TR]
[TD] If df1 <= 45 And a > b Then k1 = "-"[/TD]
[/TR]
[TR]
[TD] If df1 <= 45 And a < b Then k1 = "+"[/TD]
[/TR]
[TR]
[TD] If df2 > 45 And c > d Then k2 = "+"[/TD]
[/TR]
[TR]
[TD] If df2 > 45 And c < d Then k2 = "-"[/TD]
[/TR]
[TR]
[TD] If df2 <= 45 And c > d Then k2 = "-"[/TD]
[/TR]
[TR]
[TD] If df2 <= 45 And c < d Then k2 = "+"[/TD]
[/TR]
[TR]
[TD] If df3 > 45 And nn(1) > nn(2) Then k3 = "+"[/TD]
[/TR]
[TR]
[TD] If df3 > 45 And nn(1) < nn(2) Then k3 = "-"[/TD]
[/TR]
[TR]
[TD] If df3 <= 45 And nn(1) > nn(2) Then K3 = "-"[/TD]
[/TR]
[TR]
[TD] If df3 <= 45 And nn(1) < nn(2) Then k3 = "+"[/TD]
[/TR]
[TR]
[TD] If k1 = "-" And K2 = "-" And K3 = "+" Or k1 = "-" And K2 = "+" And K3 = "+" Or k1 = "+" And K2 = "-" And K3 = "-" Or k1 = "+" And K2 = "+" And K3 = "-" Then[/TD]
[/TR]
[TR]
[TD] t = t + 1 : ok = 1 : co = co + 1[/TD]
[/TR]
[TR]
[TD] ruota(1) = r2[/TD]
[/TR]
[TR]
[TD] ruote(1) = 11[/TD]
[/TR]
[TR]
[TD] ruote(2) = 12[/TD]
[/TR]
[TR]
[TD] Scrivi "-------------------------------------------------------------------------"[/TD]
[/TR]
[TR]
[TD] Scrivi "Estrazione " & DataEstrazione(es - 5),1[/TD]
[/TR]
[TR]
[TD] Scrivi SiglaRuota(r) & "" & Format2(a) & "." & Format2(b) & " [Pos. " & p1 & "/" & p2 & "] Do1. " & Format2(do1) & " Dv1. " & Format2(dv1),1[/TD]
[/TR]
[TR]
[TD] Scrivi SiglaRuota(rr) & "" & Format2(c) & "." & Format2(d) & " [Pos. " & p3 & "/" & p4 & "] Do2. " & Format2(do2) & " Dv2. " & Format2(dv2),1[/TD]
[/TR]
[TR]
[TD] ColoreTesto 1[/TD]
[/TR]
[TR]
[TD] Scrivi[/TD]
[/TR]
[TR]
[TD] Scrivi "Ambi Derivati: " & StringaNumeri(nr1) & " / " & StringaNumeri(nr2) & " / " & StringaNumeri(nr3)[/TD]
[/TR]
[TR]
[TD] ColoreTesto 0[/TD]
[/TR]
[TR]
[TD] ColoreTesto 2[/TD]
[/TR]
[TR]
[TD] Scrivi "Ambo trovato su " & SiglaRuota(r2) & " il " & DataEstrazione(ex) & " Colpo " & co & "? " & StringaNumeri(nn) & " [Pos. " & p5 & "/" & p6 & "]",1[/TD]
[/TR]
[TR]
[TD] ColoreTesto 0[/TD]
[/TR]
[TR]
[TD] Scrivi[/TD]
[/TR]
[TR]
[TD] Scrivi "Ambi sortiti per determinare i segni distanziali: " & "" & Format2(a) & "." & Format2(b) & _[/TD]
[/TR]
[TR]
[TD] " / " & Format2(c) & "." & Format2(d) & " / " & Format2(nn(1)) & "." & Format2(nn(2)),1[/TD]
[/TR]
[TR]
[TD] Scrivi "Segni Distanziali : " & K1 & "/" & K2 & "/" & K3,1[/TD]
[/TR]
[TR]
[TD] Scrivi "----------------------------------------------------------------Giocata n?" & t[/TD]
[/TR]
[TR]
[TD] ImpostaGiocata 1,nn,ruota,posta,18,1[/TD]
[/TR]
[TR]
[TD] ImpostaGiocata 2,nn,ruote,poste,18,2[/TD]
[/TR]
[TR]
[TD] Gioca ex[/TD]
[/TR]
[TR]
[TD] End If[/TD]
[/TR]
[TR]
[TD] End If : Next : Next[/TD]
[/TR]
[TR]
[TD] co = co + 1[/TD]
[/TR]
[TR]
[TD] If ok = 1 Then Exit For[/TD]
[/TR]
[TR]
[TD] Next[/TD]
[/TR]
[TR]
[TD] End If[/TD]
[/TR]
[TR]
[TD] End If[/TD]
[/TR]
[TR]
[TD] Next[/TD]
[/TR]
[TR]
[TD] Next[/TD]
[/TR]
[TR]
[TD] Next[/TD]
[/TR]
[TR]
[TD] Next[/TD]
[/TR]
[TR]
[TD]Next[/TD]
[/TR]
[TR]
[TD] ScriviResoconto[/TD]
[/TR]
[TR]
[TD] End Sub[/TD]
[/TR]
[/TABLE]