Ciao a tutti;
Ho corretto l'errore.... bisognerà attendere l'estrazione del 30/6.
I risultati...
Ecco lo Script:
Sub Main()
ini = 10432
fin = EstrazioneFin
colpi = 3
Dim ruota(1), poste(5), c1(5), c2(5)
ruota(1) = 1 ' Bari
poste(2) = 1 ' Ambo
poste(3) = 1 ' Terno
For es = ini To fin
n1 = Estratto(es,1,1)
n2 = Estratto(es,1,2)
If InTabella(n1) And InTabella(n2) Then
Call CreaCinquina(es,n1,c1)
Call CreaCinquina(es,n2,c2)
Scrivi "Caso " & DataEstrazione(es) & " - Bari: " & n1 & "." & n2
Scrivi "Cinquina 1: " & StringaNumeri(c1)
Scrivi "Cinquina 2: " & StringaNumeri(c2)
ImpostaGiocata 1,c1,ruota,poste,colpi,5
ImpostaGiocata 2,c2,ruota,poste,colpi,5
Gioca es + 1
End If
Next
ScriviResoconto
End Sub
Function F90

n = n Mod 90
If n = 0 Then n = 90
F90 = n
End Function
Function InTabella

tab = ".1.11.12.13.15.16.18.19.22.23.25.31.34.35.36.46.50.55.58.59.61.65.66.68.71.74.79.82.83.86.87.89."
InTabella = Instr(tab,"." & n & ".") > 0
End Function
Sub CreaCinquina(es,num,c)
dati = RigaDati(num)
v = Split(dati,";")
For k = 0 To UBound(v)
p = Split(v(k),",")
r = CInt(p(0))
e = CInt(p(1))
add = CInt(p(2))
c(k+1) = F90(Estratto(es,r,e) + add)
Next
If UBound(v) = 3 Then c(5) = num
End Sub
Function RigaDati(num)
Select Case num
Case 1
RigaDati = "4,1,53;12,1,52;12,3,25;4,4,27"
Case 11
RigaDati = "10,1,30;1,3,80;7,5,89;2,3,4;10,2,41"
Case 12
RigaDati = "7,3,64;6,3,34;5,5,5;10,1,22"
Case 13
RigaDati = "4,3,74;9,3,54;3,4,76;10,2,3;12,1,6"
Case 15
RigaDati = "8,1,20;3,5,58;6,1,12;6,2,15;3,4,31"
Case 16
RigaDati = "7,3,15;8,3,49;8,2,37;5,1,1;5,5,2"
Case 18
RigaDati = "4,5,59;2,5,42;12,5,3;1,4,60;8,3,77"
Case 19
RigaDati = "6,3,18;2,5,48;4,4,17;10,4,19;4,5,38"
Case 22
RigaDati = "12,4,78;4,5,22;12,2,32;9,1,36"
Case 23
RigaDati = "3,5,46;9,1,89;1,2,4;9,5,7;7,3,46"
Case 25
RigaDati = "6,3,29;8,5,23;2,3,29;12,4,40;1,5,64"
Case 31
RigaDati = "9,3,78;7,1,55;3,3,16;1,3,80;2,2,81"
Case 34
RigaDati = "3,5,49;10,5,12;12,1,16;7,3,23;2,1,25"
Case 35
RigaDati = "5,3,48;2,1,25;7,2,20;7,2,61;4,1,2"
Case 36
RigaDati = "8,3,22;9,3,60;12,5,79;8,2,6;12,2,8"
Case 46
RigaDati = "6,3,68;7,2,12;2,2,6;1,1,7;3,3,40"
Case 50
RigaDati = "3,3,65;10,2,50;4,5,37;3,5,76;4,2,6"
Case 55
RigaDati = "1,4,89;2,1,8;1,5,43;6,4,61;1,5,65"
Case 58
RigaDati = "6,3,6;5,2,56;5,2,2;3,3,16;10,5,18"
Case 59
RigaDati = "2,4,61;5,3,27;5,5,79;3,3,32;2,4,36"
Case 61
RigaDati = "4,1,14;2,1,51;4,3,39;12,4,1;1,4,12"
Case 65
RigaDati = "8,4,33;8,3,40;3,2,53;3,5,59;4,3,71"
Case 66
RigaDati = "12,5,23;6,3,38;8,5,22;2,1,15;4,1,23"
Case 68
RigaDati = "4,1,36;7,5,40;6,2,51;9,3,25;5,4,32"
Case 71
RigaDati = "1,1,82;8,2,20;8,4,18;5,5,45;7,4,47"
Case 74
RigaDati = "8,4,78;1,5,20;12,2,88;12,4,26;8,4,67"
Case 79
RigaDati = "3,2,51;12,3,23;3,2,72;5,4,5;12,4,35"
Case 82
RigaDati = "9,2,7;5,3,48;7,3,8;4,2,20;4,5,31"
Case 83
RigaDati = "10,4,45;9,1,58;7,2,73;8,3,3;2,4,10"
Case 86
RigaDati = "4,5,58;5,1,45;10,4,28;6,3,45;12,3,63"
Case 87
RigaDati = "8,2,71;4,3,35;12,5,6;5,1,11;9,3,14"
Case 89
RigaDati = "2,1,42;3,5,10;6,5,2;3,1,12;10,5,12"
End Select
End Function