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.
Option Explicit
Sub Main
Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13
Dim A,B,C,D,X,Y,K
Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
Dim RS,RV,RX,RK,ES
Dim R1,R2,P1,P2
Dim S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14
posta(1) = 1
poste(2) = 1
'
RS = InputBox("Quante estrazioni vuoi controllare?",,0)
K = 9
For ES = EstrazioneFin - RS To EstrazioneFin
AvanzamentoElab EstrazioneFin - RS,EstrazioneFin,ES
For R1 = 1 To 9
R2 = R1 + 2
If R2 = 11 Then R2 = 12
For P1 = 1 To 3
P2 = P1 + 2
'
A = Estratto(ES,R1,P1)
B = Estratto(ES,R1,P2)
C = Estratto(ES,R2,P1)
D = Estratto(ES,R2,P2)
'
'If Fuori90(A + B) = Fuori90(C + D) Then
'
'
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) = P1
'
MatriceCaselleDaEvid(4,0) = R2
MatriceCaselleDaEvid(4,1) = P2
'
ReDim MatriceLegami(4,3)
'
MatriceLegami(1,0) = R1
MatriceLegami(1,1) = P1
MatriceLegami(1,2) = R1
MatriceLegami(1,3) = P2
'
If R2 = 12 Then MatriceLegami(2,0) = R2 - 1 Else MatriceLegami(2,0) = R2
MatriceLegami(2,1) = P1
If R2 = 12 Then MatriceLegami(2,2) = R2 - 1 Else MatriceLegami(2,2) = R2
MatriceLegami(2,3) = P2
'
MatriceLegami(3,0) = R1
MatriceLegami(3,1) = P1
If R2 = 12 Then MatriceLegami(3,2) = R2 - 1 Else MatriceLegami(3,2) = R2
MatriceLegami(3,3) = P1
'
MatriceLegami(4,0) = R1
MatriceLegami(4,1) = P2
If R2 = 12 Then MatriceLegami(4,2) = R2 - 1 Else MatriceLegami(4,2) = R2
MatriceLegami(4,3) = P2
'
'
Call DisegnaEstrazione(ES,MatriceCaselleDaEvid,MatriceLegami)
'
'
T1 = Array(T1,"So1","So2","Diff"," ","So3","So4","Diff","1Ambo",A,B)
Call InitTabella(T1)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'------------------------------------------------
T2 = Array(T2," "," "," "," "," "," "," ","2Ambo",C,D)
Call AddRigaTabella(T2)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
'-------------------------------
'-------------------------------
If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
'-------------------------------
A = A & "+" : B = B & "+"
'-------------------------------
'-----------------------------------------------
T3 = Array(T3,A,B," "," ",S1,S2," "," "," "," ")
Call AddRigaTabella(T3)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If pari(S3) Then
'
'-------------------------------
T4 = Array(T4,C,D," "," ",S4,S4," "," "," "," ")
Call AddRigaTabella(T4)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T5 = Array(T5," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T5)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If S1 > S2 Then
S5 = Fuori90(S1 - S4)
Else
S5 = Fuori90(S1 + S4)
End If
If S2 < S1 Then
S6 = Fuori90(S2 + S4)
Else
S6 = Fuori90(S2 - S4)
End If
'
S7 = 0
'
'-------------------------------
T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3)," ",S5,S6,S7,"Figura",Figura(A),Figura(B))
Call AddRigaTabella(T6)
Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T7 = Array(T7," "," "," "," "," "," "," ","Figura",Figura(C),Figura(D))
Call AddRigaTabella(T7)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
S8 = Fuori90(A + B)
S9 = Fuori90(C + D)
'
If S8 > S9 Then S8 = S8 & "-" Else S9 = S9 & "-"
If S9 < S8 Then S9 = S9 & "+" Else S8 = S8 & "+"
'
'-------------------------------
T8 = Array(T8," "," "," "," ",S8,S9," "," "," "," ")
Call AddRigaTabella(T8)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S8 = Fuori90(A + B)
S9 = Fuori90(C + D)
S10 = Differenza(S8,S9)
S11 = S10/2
'
'-------------------------------
T9 = Array(T9,A,B,S8," ",S11,S11," "," "," "," ")
Call AddRigaTabella(T9)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S8 = Fuori90(A + B)
S9 = Fuori90(C + D)
S10 = Differenza(S8,S9)
S11 = S10/2
'-------------------------------
T10 = Array(T10,C,D,S9," "," "," "," "," "," "," ")
Call AddRigaTabella(T10)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S8 = Fuori90(A + B)
S9 = Fuori90(C + D)
S10 = Differenza(S8,S9)
S11 = S10/2
'
If S8 > S9 Then
S12 = Fuori90(S8 - S11)
Else
S12 = Fuori90(S8 + S11)
End If
If S9 < S8 Then
S13 = Fuori90(S9 + S11)
Else
S13 = Fuori90(S9 - S11)
End If
'
'-------------------------------
T11 = Array(T11," "," ",S10," ",S12,S13,S7," "," "," ")
Call AddRigaTabella(T11)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T12 = Array(T12," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T12)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T13 = Array(T13," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T13)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
Call SetTableWidth("21%")
CreaTabella
'------------------------------
ruota(1) = R1
ruota(2) = R2
'-----------------------------
ruote(1) = R1
ruote(2) = R2
ruote(3) = 11
ruote(4) = 12
'----------------------------
ambata1(1) = Fuori90(S5)
'
ambo1(1) = ambata1(1)
ambo1(2) = S1
'----------------
ambo2(1) = ambata1(1)
ambo2(2) = S2
'----------------
'----------------
'----------------
ImpostaGiocata 1,ambata1,ruota,posta,K
Gioca ES,1,,1
Scrivi
ImpostaGiocata 1,ambo1,ruote,poste,K
ImpostaGiocata 2,ambo2,ruote,poste,K
Gioca ES,1,,1
Scrivi
End If
'End If
Next
Next
Next
End Sub
Sub Main
Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13
Dim A,B,C,D,X,Y,K
Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
Dim RS,RV,RX,RK,ES
Dim R1,R2,P1,P2
Dim S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15,S16
Dim N8,N9
posta(1) = 1
poste(2) = 1
'
RS = InputBox("Quante estrazioni vuoi controllare?",,0)
K = 9
For ES = EstrazioneFin - RS To EstrazioneFin
AvanzamentoElab EstrazioneFin - RS,EstrazioneFin,ES
For R1 = 1 To 9
R2 = R1 + 2
If R2 = 11 Then R2 = 12
For P1 = 1 To 3
P2 = P1 + 2
'
A = Estratto(ES,R1,P1)
B = Estratto(ES,R1,P2)
C = Estratto(ES,R2,P1)
D = Estratto(ES,R2,P2)
'
N8 = Fuori90(A + B)
N9 = Fuori90(C + D)
'
'
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) = P1
'
MatriceCaselleDaEvid(4,0) = R2
MatriceCaselleDaEvid(4,1) = P2
'
ReDim MatriceLegami(4,3)
'
MatriceLegami(1,0) = R1
MatriceLegami(1,1) = P1
MatriceLegami(1,2) = R1
MatriceLegami(1,3) = P2
'
If R2 = 12 Then MatriceLegami(2,0) = R2 - 1 Else MatriceLegami(2,0) = R2
MatriceLegami(2,1) = P1
If R2 = 12 Then MatriceLegami(2,2) = R2 - 1 Else MatriceLegami(2,2) = R2
MatriceLegami(2,3) = P2
'
MatriceLegami(3,0) = R1
MatriceLegami(3,1) = P1
If R2 = 12 Then MatriceLegami(3,2) = R2 - 1 Else MatriceLegami(3,2) = R2
MatriceLegami(3,3) = P1
'
MatriceLegami(4,0) = R1
MatriceLegami(4,1) = P2
If R2 = 12 Then MatriceLegami(4,2) = R2 - 1 Else MatriceLegami(4,2) = R2
MatriceLegami(4,3) = P2
'
'
Call DisegnaEstrazione(ES,MatriceCaselleDaEvid,MatriceLegami)
'
'
T1 = Array(T1,"So1","So2","Diff"," ","So3","So4","Diff","1Ambo",A,B)
Call InitTabella(T1)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'------------------------------------------------
T2 = Array(T2," "," "," "," "," "," "," ","2Ambo",C,D)
Call AddRigaTabella(T2)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
'
S8 = Fuori90(A + B)
S9 = Fuori90(C + D)
S10 = Differenza(S8,S9)
S11 = S10/2
'-------------------------------
If S8 > S9 Then : S12 = Fuori90(S8 - S11) Else S12 = Fuori90(S8 + S11)
If S9 < S8 Then : S13 = Fuori90(S9 + S11) Else S13 = Fuori90(S9 - S11)
'
'-------------------------------
If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
'-------------------------------
If S8 > S9 Then S8 = S8 & "-" Else S9 = S9 & "-"
If S9 < S8 Then S9 = S9 & "+" Else S8 = S8 & "+"
'
'
A = A & "+" : B = B & "+"
'-------------------------------
'-----------------------------------------------
T3 = Array(T3,A,B," "," ",S1,S2," "," "," "," ")
Call AddRigaTabella(T3)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If pari(S3) Then
'
'-------------------------------
T4 = Array(T4,C,D," "," ",S4,S4," "," "," "," ")
Call AddRigaTabella(T4)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T5 = Array(T5," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T5)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
If S1 > S2 Then : S5 = Fuori90(S1 - S4) Else S5 = Fuori90(S1 + S4)
If S2 < S1 Then : S6 = Fuori90(S2 + S4) Else S6 = Fuori90(S2 - S4)
'
S7 = 0
'
'-------------------------------
T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3)," ",S5,S6,S7,"Figura",Figura(A),Figura(B))
Call AddRigaTabella(T6)
Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T7 = Array(T7," "," "," "," "," "," "," ","Figura",Figura(C),Figura(D))
Call AddRigaTabella(T7)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T8 = Array(T8," "," "," "," ",S8,S9," "," "," "," ")
Call AddRigaTabella(T8)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T9 = Array(T9,A,B,N8," ",S11,S11," "," "," "," ")
Call AddRigaTabella(T9)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T10 = Array(T10,C,D,N9," "," "," "," "," "," "," ")
Call AddRigaTabella(T10)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T11 = Array(T11," "," ",S10," ",S12,S13,S7," "," "," ")
Call AddRigaTabella(T11)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T12 = Array(T12," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T12)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T13 = Array(T13," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T13)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
Call SetTableWidth("21%")
CreaTabella
'------------------------------
ruota(1) = R1
ruota(2) = R2
'-----------------------------
ruote(1) = R1
ruote(2) = R2
ruote(3) = 11
ruote(4) = 12
'----------------------------
ambata1(1) = Fuori90(S5)
ambata2(1) = Fuori90(S12)
'
ambo1(1) = ambata1(1)
ambo1(2) = S1
'----------------
ambo2(1) = ambata1(1)
ambo2(2) = S2
'----------------
'----------------
ambo3(1) = ambata2(1)
ambo3(2) = N8
'----------------
ambo4(1) = ambata2(1)
ambo4(2) = N9
'----------------
'----------------
ImpostaGiocata 1,ambata1,ruota,posta,K
ImpostaGiocata 2,ambata2,ruota,posta,K
Gioca ES,1,,1
Scrivi
Scrivi"............................"
Scrivi
ImpostaGiocata 1,ambo1,ruote,poste,K
ImpostaGiocata 2,ambo2,ruote,poste,K
ImpostaGiocata 3,ambo3,ruote,poste,K
ImpostaGiocata 4,ambo4,ruote,poste,K
Gioca ES,1,,1
Scrivi
End If
Next
Next
Next
End Sub
Sub Main
Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13
Dim A,B,C,D,X,Y,K
Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
Dim RS,RV,RX,RK,ES
Dim R1,R2,P1,P2
Dim S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15,S16
Dim N8,N9
posta(1) = 1
poste(2) = 1
'
RS = InputBox("Quante estrazioni vuoi controllare?",,0)
K = 9
For ES = EstrazioneFin - RS To EstrazioneFin
AvanzamentoElab EstrazioneFin - RS,EstrazioneFin,ES
For R1 = 1 To 10
R2 = R1 + 1
If R2 = 11 Then R2 = 12
For P1 = 1 To 4
P2 = P1 + 1
'
A = Estratto(ES,R1,P1)
B = Estratto(ES,R1,P2)
C = Estratto(ES,R2,P1)
D = Estratto(ES,R2,P2)
'
N8 = Fuori90(A + B)
N9 = Fuori90(C + D)
'
'
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) = P1
'
MatriceCaselleDaEvid(4,0) = R2
MatriceCaselleDaEvid(4,1) = P2
'
ReDim MatriceLegami(4,3)
'
MatriceLegami(1,0) = R1
MatriceLegami(1,1) = P1
MatriceLegami(1,2) = R1
MatriceLegami(1,3) = P2
'
If R2 = 12 Then MatriceLegami(2,0) = R2 - 1 Else MatriceLegami(2,0) = R2
MatriceLegami(2,1) = P1
If R2 = 12 Then MatriceLegami(2,2) = R2 - 1 Else MatriceLegami(2,2) = R2
MatriceLegami(2,3) = P2
'
MatriceLegami(3,0) = R1
MatriceLegami(3,1) = P1
If R2 = 12 Then MatriceLegami(3,2) = R2 - 1 Else MatriceLegami(3,2) = R2
MatriceLegami(3,3) = P1
'
MatriceLegami(4,0) = R1
MatriceLegami(4,1) = P2
If R2 = 12 Then MatriceLegami(4,2) = R2 - 1 Else MatriceLegami(4,2) = R2
MatriceLegami(4,3) = P2
'
'
Call DisegnaEstrazione(ES,MatriceCaselleDaEvid,MatriceLegami)
'
'
T1 = Array(T1,"So1","So2","Diff"," ","So3","So4","Diff","1Ambo",A,B)
Call InitTabella(T1)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'------------------------------------------------
T2 = Array(T2," "," "," "," "," "," "," ","2Ambo",C,D)
Call AddRigaTabella(T2)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
'
S8 = Fuori90(A + B)
S9 = Fuori90(C + D)
S10 = Differenza(S8,S9)
S11 = S10/2
'-------------------------------
If S8 > S9 Then : S12 = Fuori90(S8 - S11) Else S12 = Fuori90(S8 + S11)
If S9 < S8 Then : S13 = Fuori90(S9 + S11) Else S13 = Fuori90(S9 - S11)
'
'-------------------------------
If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
'-------------------------------
If S8 > S9 Then S8 = S8 & "-" Else S9 = S9 & "-"
If S9 < S8 Then S9 = S9 & "+" Else S8 = S8 & "+"
'
'
A = A & "+" : B = B & "+"
'-------------------------------
'-----------------------------------------------
T3 = Array(T3,A,B," "," ",S1,S2," "," "," "," ")
Call AddRigaTabella(T3)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If pari(S3) Then
'
'-------------------------------
T4 = Array(T4,C,D," "," ",S4,S4," "," "," "," ")
Call AddRigaTabella(T4)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T5 = Array(T5," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T5)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
If S1 > S2 Then : S5 = Fuori90(S1 - S4) Else S5 = Fuori90(S1 + S4)
If S2 < S1 Then : S6 = Fuori90(S2 + S4) Else S6 = Fuori90(S2 - S4)
'
S7 = 0
'
'-------------------------------
T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3)," ",S5,S6,S7,"Figura",Figura(A),Figura(B))
Call AddRigaTabella(T6)
Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T7 = Array(T7," "," "," "," "," "," "," ","Figura",Figura(C),Figura(D))
Call AddRigaTabella(T7)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T8 = Array(T8," "," "," "," ",S8,S9," "," "," "," ")
Call AddRigaTabella(T8)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T9 = Array(T9,A,B,N8," ",S11,S11," "," "," "," ")
Call AddRigaTabella(T9)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T10 = Array(T10,C,D,N9," "," "," "," "," "," "," ")
Call AddRigaTabella(T10)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T11 = Array(T11," "," ",S10," ",S12,S13,S7," "," "," ")
Call AddRigaTabella(T11)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T12 = Array(T12," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T12)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T13 = Array(T13," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T13)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
Call SetTableWidth("21%")
CreaTabella
'------------------------------
ruota(1) = R1
ruota(2) = R2
'-----------------------------
ruote(1) = R1
ruote(2) = R2
ruote(3) = 11
ruote(4) = 12
'----------------------------
ambata1(1) = Fuori90(S5)
ambata2(1) = Fuori90(S12)
'
ambo1(1) = ambata1(1)
ambo1(2) = S1
'----------------
ambo2(1) = ambata1(1)
ambo2(2) = S2
'----------------
'----------------
ambo3(1) = ambata2(1)
ambo3(2) = N8
'----------------
ambo4(1) = ambata2(1)
ambo4(2) = N9
'----------------
'----------------
ImpostaGiocata 1,ambata1,ruota,posta,K
ImpostaGiocata 2,ambata2,ruota,posta,K
Gioca ES,1,,1
Scrivi
Scrivi"............................"
Scrivi
ImpostaGiocata 1,ambo1,ruote,poste,K
ImpostaGiocata 2,ambo2,ruote,poste,K
ImpostaGiocata 3,ambo3,ruote,poste,K
ImpostaGiocata 4,ambo4,ruote,poste,K
Gioca ES,1,,1
Scrivi
End If
Next
Next
Next
End Sub
Sub Main
Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13
Dim A,B,C,D,X,Y,K
Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
Dim RS,RV,RX,RK,ES
Dim R1,R2,P1,P2
Dim S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15,S16
Dim N8,N9
posta(1) = 1
poste(2) = 1
'
RS = InputBox("Quante estrazioni vuoi controllare?",,0)
K = 9
For ES = EstrazioneFin - RS To EstrazioneFin
AvanzamentoElab EstrazioneFin - RS,EstrazioneFin,ES
For R1 = 1 To 8
R2 = R1 + 3
If R2 = 11 Then R2 = 12
For P1 = 1 To 2
P2 = P1 + 3
'
A = Estratto(ES,R1,P1)
B = Estratto(ES,R1,P2)
C = Estratto(ES,R2,P1)
D = Estratto(ES,R2,P2)
'
N8 = Fuori90(A + B)
N9 = Fuori90(C + D)
'
'
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) = P1
'
MatriceCaselleDaEvid(4,0) = R2
MatriceCaselleDaEvid(4,1) = P2
'
ReDim MatriceLegami(4,3)
'
MatriceLegami(1,0) = R1
MatriceLegami(1,1) = P1
MatriceLegami(1,2) = R1
MatriceLegami(1,3) = P2
'
If R2 = 12 Then MatriceLegami(2,0) = R2 - 1 Else MatriceLegami(2,0) = R2
MatriceLegami(2,1) = P1
If R2 = 12 Then MatriceLegami(2,2) = R2 - 1 Else MatriceLegami(2,2) = R2
MatriceLegami(2,3) = P2
'
MatriceLegami(3,0) = R1
MatriceLegami(3,1) = P1
If R2 = 12 Then MatriceLegami(3,2) = R2 - 1 Else MatriceLegami(3,2) = R2
MatriceLegami(3,3) = P1
'
MatriceLegami(4,0) = R1
MatriceLegami(4,1) = P2
If R2 = 12 Then MatriceLegami(4,2) = R2 - 1 Else MatriceLegami(4,2) = R2
MatriceLegami(4,3) = P2
'
'
Call DisegnaEstrazione(ES,MatriceCaselleDaEvid,MatriceLegami)
'
'
T1 = Array(T1,"So1","So2","Diff"," ","So3","So4","Diff","1Ambo",A,B)
Call InitTabella(T1)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'------------------------------------------------
T2 = Array(T2," "," "," "," "," "," "," ","2Ambo",C,D)
Call AddRigaTabella(T2)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
'
S8 = Fuori90(A + B)
S9 = Fuori90(C + D)
S10 = Differenza(S8,S9)
S11 = S10/2
'-------------------------------
If S8 > S9 Then : S12 = Fuori90(S8 - S11) Else S12 = Fuori90(S8 + S11)
If S9 < S8 Then : S13 = Fuori90(S9 + S11) Else S13 = Fuori90(S9 - S11)
'
'-------------------------------
If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
'-------------------------------
If S8 > S9 Then S8 = S8 & "-" Else S9 = S9 & "-"
If S9 < S8 Then S9 = S9 & "+" Else S8 = S8 & "+"
'
'
A = A & "+" : B = B & "+"
'-------------------------------
'-----------------------------------------------
T3 = Array(T3,A,B," "," ",S1,S2," "," "," "," ")
Call AddRigaTabella(T3)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If pari(S3) Then
'
'-------------------------------
T4 = Array(T4,C,D," "," ",S4,S4," "," "," "," ")
Call AddRigaTabella(T4)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T5 = Array(T5," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T5)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
If S1 > S2 Then : S5 = Fuori90(S1 - S4) Else S5 = Fuori90(S1 + S4)
If S2 < S1 Then : S6 = Fuori90(S2 + S4) Else S6 = Fuori90(S2 - S4)
'
S7 = 0
'
'-------------------------------
T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3)," ",S5,S6,S7,"Figura",Figura(A),Figura(B))
Call AddRigaTabella(T6)
Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T7 = Array(T7," "," "," "," "," "," "," ","Figura",Figura(C),Figura(D))
Call AddRigaTabella(T7)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T8 = Array(T8," "," "," "," ",S8,S9," "," "," "," ")
Call AddRigaTabella(T8)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T9 = Array(T9,A,B,N8," ",S11,S11," "," "," "," ")
Call AddRigaTabella(T9)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T10 = Array(T10,C,D,N9," "," "," "," "," "," "," ")
Call AddRigaTabella(T10)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T11 = Array(T11," "," ",S10," ",S12,S13,S7," "," "," ")
Call AddRigaTabella(T11)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T12 = Array(T12," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T12)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T13 = Array(T13," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T13)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
Call SetTableWidth("21%")
CreaTabella
'------------------------------
ruota(1) = R1
ruota(2) = R2
'-----------------------------
ruote(1) = R1
ruote(2) = R2
ruote(3) = 11
ruote(4) = 12
'----------------------------
ambata1(1) = Fuori90(S5)
ambata2(1) = Fuori90(S12)
'
ambo1(1) = ambata1(1)
ambo1(2) = S1
'----------------
ambo2(1) = ambata1(1)
ambo2(2) = S2
'----------------
'----------------
ambo3(1) = ambata2(1)
ambo3(2) = N8
'----------------
ambo4(1) = ambata2(1)
ambo4(2) = N9
'----------------
'----------------
ImpostaGiocata 1,ambata1,ruota,posta,K
ImpostaGiocata 2,ambata2,ruota,posta,K
Gioca ES,1,,1
Scrivi
Scrivi"............................"
Scrivi
ImpostaGiocata 1,ambo1,ruote,poste,K
ImpostaGiocata 2,ambo2,ruote,poste,K
ImpostaGiocata 3,ambo3,ruote,poste,K
ImpostaGiocata 4,ambo4,ruote,poste,K
Gioca ES,1,,1
Scrivi
End If
Next
Next
Next
End Sub
Sub Main
Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13
Dim A,B,C,D,X,Y,K
Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
Dim RS,RV,RX,RK,ES
Dim R1,R2,P1,P2
Dim S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15,S16
Dim N8,N9
posta(1) = 1
poste(2) = 1
'
RS = InputBox("Quante estrazioni vuoi controllare?",,0)
K = 9
For ES = EstrazioneFin - RS To EstrazioneFin
AvanzamentoElab EstrazioneFin - RS,EstrazioneFin,ES
For R1 = 1 To 7
R2 = R1 + 4
If R2 = 11 Then R2 = 12
For P1 = 1 To 1
P2 = P1 + 4
'
A = Estratto(ES,R1,P1)
B = Estratto(ES,R1,P2)
C = Estratto(ES,R2,P1)
D = Estratto(ES,R2,P2)
'
N8 = Fuori90(A + B)
N9 = Fuori90(C + D)
'
'
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) = P1
'
MatriceCaselleDaEvid(4,0) = R2
MatriceCaselleDaEvid(4,1) = P2
'
ReDim MatriceLegami(4,3)
'
MatriceLegami(1,0) = R1
MatriceLegami(1,1) = P1
MatriceLegami(1,2) = R1
MatriceLegami(1,3) = P2
'
If R2 = 12 Then MatriceLegami(2,0) = R2 - 1 Else MatriceLegami(2,0) = R2
MatriceLegami(2,1) = P1
If R2 = 12 Then MatriceLegami(2,2) = R2 - 1 Else MatriceLegami(2,2) = R2
MatriceLegami(2,3) = P2
'
MatriceLegami(3,0) = R1
MatriceLegami(3,1) = P1
If R2 = 12 Then MatriceLegami(3,2) = R2 - 1 Else MatriceLegami(3,2) = R2
MatriceLegami(3,3) = P1
'
MatriceLegami(4,0) = R1
MatriceLegami(4,1) = P2
If R2 = 12 Then MatriceLegami(4,2) = R2 - 1 Else MatriceLegami(4,2) = R2
MatriceLegami(4,3) = P2
'
'
Call DisegnaEstrazione(ES,MatriceCaselleDaEvid,MatriceLegami)
'
'
T1 = Array(T1,"So1","So2","Diff"," ","So3","So4","Diff","1Ambo",A,B)
Call InitTabella(T1)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'------------------------------------------------
T2 = Array(T2," "," "," "," "," "," "," ","2Ambo",C,D)
Call AddRigaTabella(T2)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
'
S8 = Fuori90(A + B)
S9 = Fuori90(C + D)
S10 = Differenza(S8,S9)
S11 = S10/2
'-------------------------------
If S8 > S9 Then : S12 = Fuori90(S8 - S11) Else S12 = Fuori90(S8 + S11)
If S9 < S8 Then : S13 = Fuori90(S9 + S11) Else S13 = Fuori90(S9 - S11)
'
'-------------------------------
If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
'-------------------------------
If S8 > S9 Then S8 = S8 & "-" Else S9 = S9 & "-"
If S9 < S8 Then S9 = S9 & "+" Else S8 = S8 & "+"
'
'
A = A & "+" : B = B & "+"
'-------------------------------
'-----------------------------------------------
T3 = Array(T3,A,B," "," ",S1,S2," "," "," "," ")
Call AddRigaTabella(T3)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If pari(S3) Then
'
'-------------------------------
T4 = Array(T4,C,D," "," ",S4,S4," "," "," "," ")
Call AddRigaTabella(T4)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T5 = Array(T5," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T5)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
If S1 > S2 Then : S5 = Fuori90(S1 - S4) Else S5 = Fuori90(S1 + S4)
If S2 < S1 Then : S6 = Fuori90(S2 + S4) Else S6 = Fuori90(S2 - S4)
'
S7 = 0
'
'-------------------------------
T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3)," ",S5,S6,S7,"Figura",Figura(A),Figura(B))
Call AddRigaTabella(T6)
Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T7 = Array(T7," "," "," "," "," "," "," ","Figura",Figura(C),Figura(D))
Call AddRigaTabella(T7)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T8 = Array(T8," "," "," "," ",S8,S9," "," "," "," ")
Call AddRigaTabella(T8)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T9 = Array(T9,A,B,N8," ",S11,S11," "," "," "," ")
Call AddRigaTabella(T9)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T10 = Array(T10,C,D,N9," "," "," "," "," "," "," ")
Call AddRigaTabella(T10)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T11 = Array(T11," "," ",S10," ",S12,S13,S7," "," "," ")
Call AddRigaTabella(T11)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T12 = Array(T12," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T12)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T13 = Array(T13," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T13)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
Call SetTableWidth("21%")
CreaTabella
'------------------------------
ruota(1) = R1
ruota(2) = R2
'-----------------------------
ruote(1) = R1
ruote(2) = R2
ruote(3) = 11
ruote(4) = 12
'----------------------------
ambata1(1) = Fuori90(S5)
ambata2(1) = Fuori90(S12)
'
ambo1(1) = ambata1(1)
ambo1(2) = S1
'----------------
ambo2(1) = ambata1(1)
ambo2(2) = S2
'----------------
'----------------
ambo3(1) = ambata2(1)
ambo3(2) = N8
'----------------
ambo4(1) = ambata2(1)
ambo4(2) = N9
'----------------
'----------------
ImpostaGiocata 1,ambata1,ruota,posta,K
ImpostaGiocata 2,ambata2,ruota,posta,K
Gioca ES,1,,1
Scrivi
Scrivi"............................"
Scrivi
ImpostaGiocata 1,ambo1,ruote,poste,K
ImpostaGiocata 2,ambo2,ruote,poste,K
ImpostaGiocata 3,ambo3,ruote,poste,K
ImpostaGiocata 4,ambo4,ruote,poste,K
Gioca ES,1,,1
Scrivi
End If
Next
Next
Next
End Sub
Sub Main
Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12
Dim A,B,C,D,X,Y
Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
Dim cinquina(5)
Dim rs,rv,rx,rk
Dim r1,r2,r3,r4
posta(1) = 1
poste(2) = 1
'
rs = InputBox("Quante estrazioni vuoi controllare?",,0)
k = 0
For es = EstrazioneFin - rs To EstrazioneFin
AvanzamentoElab EstrazioneFin - rs,EstrazioneFin,es
For r1 = 1 To 10
For r2 = r1 + 1 To 11
If r2 = 11 Then r2 = 12
For p1 = 1 To 4
For p2 = p1 + 1 To 5
'
For p3 = 1 To 4
For p4 = p3 + 1 To 5
'
A = Estratto(es,r1,p1)
B = Estratto(es,r1,p2)
C = Estratto(es,r2,p3)
D = Estratto(es,r2,p4)
'
If A = C And B = D Or A = D And B = C Then
'
'
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(es,MatriceCaselleDaEvid)
'
'
T1 = Array(T1,"So1","So2","Diff"," ","So3","So4","Diff","1Ambo",A,B)
Call InitTabella(T1)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'------------------------------------------------
T2 = Array(T2," "," "," "," "," "," "," ","2Ambo",C,D)
Call AddRigaTabella(T2)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
'-------------------------------
'-------------------------------
If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
'-------------------------------
A = A & "+" : B = B & "+"
'-----------------------------------------------
T3 = Array(T3,A,B," "," ",S1,S2," "," "," "," ")
Call AddRigaTabella(T3)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If pari(S3) Then
'
'-------------------------------
T4 = Array(T4,C,D," "," ",S4,S4," "," "," "," ")
Call AddRigaTabella(T4)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T5 = Array(T5," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T5)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If S1 > S2 Then S5 = Fuori90(S1 - S4) Else S5 = Fuori90(S1 + S4)
If S2 < S1 Then S6 = Fuori90(S2 + S4) Else S6 = Fuori90(S2 - S4)
'
S9 = 0
'
'-------------------------------
T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3)," ",S5,S6,S9,"Figura",Figura(A),Figura(B))
Call AddRigaTabella(T6)
Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T7 = Array(T7," "," "," "," "," "," "," ","Figura",Figura(C),Figura(D))
Call AddRigaTabella(T7)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
'-------------------------------
'-------------------------------
If S1 > S2 Then S1 = S1 & "+" Else S2 = S2 & "+"
If S2 < S1 Then S2 = S2 & "-" Else S1 = S1 & "-"
'-------------------------------
'-------------------------------
T8 = Array(T8," "," "," "," ",S1,S2," "," "," "," ")
Call AddRigaTabella(T8)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If pari(S3) Then
'-------------------------------
T9 = Array(T9," "," "," "," ",S4,S4," "," "," "," ")
Call AddRigaTabella(T9)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
'-------------------------------
T10 = Array(T10," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T10)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If S1 > S2 Then S7 = Fuori90(S1 + S4) Else S7 = Fuori90(S1 - S4)
If S2 < S1 Then S8 = Fuori90(S2 - S4) Else S8 = Fuori90(S2 + S4)
'
'-------------------------------
T11 = Array(T11," "," "," "," ",S7,S8," "," "," "," ")
Call AddRigaTabella(T11)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(6,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(7,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T12 = Array(T12," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T12)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'
'-------------------------------
Call SetTableWidth("21%")
CreaTabella
'------------------------------
ruota(1) = r1
ruota(2) = r2
'-----------------------------
ruote(1) = r1
ruote(2) = r2
ruote(3) = 11
ruote(4) = 12
'----------------------------
ambata1(1) =(S5)
'
ambo1(1) = ambata1(1)
ambo1(2) = S1
'----------------
ambo2(1) = ambata1(1)
ambo2(2) = S2
'----------------
'If A = D And B = C Then
ambo3(1) =(S5)
ambo3(2) =(S7)
ambo4(1) =(S5)
ambo4(2) =(S8)
'
ambo5(1) =(S5)
ambo5(2) = Fuori90(A + D)
ambo6(1) =(S5)
ambo6(2) = Fuori90(B + C)
'
If S5 < 46 Then
ambo7(1) = Fuori90(S5 + A)
ambo7(2) = Fuori90(S5 + B)
Else
ambo7(1) = Fuori90(Diametrale(S5) + A)
ambo7(2) = Fuori90(Diametrale(S5) + B)
End If
'
cinquina(1) = S5
cinquina(2) = S1
cinquina(3) = S2
cinquina(4) = S7
cinquina(5) = S8
'End If
ImpostaGiocata 1,ambata1,ruota,posta,k
Gioca es,1,,1
Scrivi
ImpostaGiocata 1,ambo1,ruote,poste,k
ImpostaGiocata 2,ambo2,ruote,poste,k
Gioca es,1,,1
Scrivi
Scrivi"-----------------------------"
Scrivi
ImpostaGiocata 1,ambo3,ruote,poste,k
ImpostaGiocata 2,ambo4,ruote,poste,k
Gioca es,1,,1
Scrivi
ImpostaGiocata 1,cinquina,ruote,poste,k
Gioca es,1,,1
Scrivi
ImpostaGiocata 1,ambo5,ruote,poste,k
ImpostaGiocata 2,ambo6,ruote,poste,k
Gioca es,1,,1
Scrivi
ImpostaGiocata 1,ambo7,ruote,poste,k
Gioca es,1,,1
Scrivi
End If
End If
End If
Next
Next
Next
Next
Next
Next
Next
End Sub
Sub Main
Dim T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12
Dim A,B,C,D,X,Y
Dim ambata1(2),ambata2(2),ambata3(2),calc(10),ruota(5),ruote(5),posta(1),poste(2)
Dim ambo1(2),ambo2(2),ambo3(2),ambo4(2),ambo5(2),ambo6(2),ambo7(2),ambo8(2),ambo9(2)
Dim cinquina(5)
Dim rs,rv,rx,rk
Dim r1,r2,r3,r4
posta(1) = 1
poste(2) = 1
'
'rk = InputBox("1numero")
rs = InputBox("Quante estrazioni vuoi controllare?",,0)
k = 9
For es = EstrazioneFin - rs To EstrazioneFin
AvanzamentoElab EstrazioneFin - rs,EstrazioneFin,es
For r1 = 1 To 9
For r2 = r1 + 1 To 10
'If r2 = 11 Then r2 = 12
For p1 = 1 To 4
For p2 = p1 + 1 To 5
'
For rx = rk To rk
'
A = Estratto(es,r1,p1)
B = Estratto(es,r1,p2)
C = Estratto(es,r2,p1)
D = Estratto(es,r2,p2)
'
If Distanza(r1,r2) = 1 And Distanza(p1,p2) = 1 _
Or Distanza(r1,r2) = 2 And Distanza(p1,p2) = 2 _
Or Distanza(r1,r2) = 3 And Distanza(p1,p2) = 3 _
Or Distanza(r1,r2) = 4 And Distanza(p1,p2) = 4 Then
'
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If pari(S3) Then
'
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) = p1
'
MatriceCaselleDaEvid(4,0) = r2
MatriceCaselleDaEvid(4,1) = p2
'
'Call DisegnaEstrazione(es,MatriceCaselleDaEvid)
'
ReDim MatriceLegami(4,3)
'
MatriceLegami(1,0) = r1
MatriceLegami(1,1) = p1
MatriceLegami(1,2) = r1
MatriceLegami(1,3) = p2
'
If r2 = 12 Then MatriceLegami(2,0) = r2 - 1 Else MatriceLegami(2,0) = r2
MatriceLegami(2,1) = p1
If r2 = 12 Then MatriceLegami(2,2) = r2 - 1 Else MatriceLegami(2,2) = r2
MatriceLegami(2,3) = p2
'
MatriceLegami(3,0) = r1
MatriceLegami(3,1) = p1
If r2 = 12 Then MatriceLegami(3,2) = r2 - 1 Else MatriceLegami(3,2) = r2
MatriceLegami(3,3) = p1
'
MatriceLegami(4,0) = r1
MatriceLegami(4,1) = p2
If r2 = 12 Then MatriceLegami(4,2) = r2 - 1 Else MatriceLegami(4,2) = r2
MatriceLegami(4,3) = p2
'
Call DisegnaEstrazione(ES,MatriceCaselleDaEvid,MatriceLegami)
'
T1 = Array(T1,"So1","So2","Diff"," ","So3","So4","Diff","1Ambo",A,B)
Call InitTabella(T1)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'------------------------------------------------
T2 = Array(T2," "," "," "," "," "," "," ","2Ambo",C,D)
Call AddRigaTabella(T2)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
'-------------------------------
'-------------------------------
If S1 > S2 Then S1 = S1 & "-" Else S2 = S2 & "-"
If S2 < S1 Then S2 = S2 & "+" Else S1 = S1 & "+"
'-------------------------------
A = A & "+" : B = B & "+"
'-----------------------------------------------
T3 = Array(T3,A,B," "," ",S1,S2," "," "," "," ")
Call AddRigaTabella(T3)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T4 = Array(T4,C,D," "," ",S4,S4," "," "," "," ")
Call AddRigaTabella(T4)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T5 = Array(T5," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T5)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If S1 > S2 Then S5 = Fuori90(S1 - S4) Else S5 = Fuori90(S1 + S4)
If S2 < S1 Then S6 = Fuori90(S2 + S4) Else S6 = Fuori90(S2 - S4)
'
S9 = 0
'
'-------------------------------
T6 = Array(T6,Format2(S1),Format2(S2),Format2(S3)," ",S5,S6,S9,"Figura",Figura(A),Figura(B))
Call AddRigaTabella(T6)
Call SetColoreCella(1,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(2,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,187,9),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(6,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(7,RGB(223,249,3),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'-------------------------------
T7 = Array(T7," "," "," "," "," "," "," ","Figura",Figura(C),Figura(D))
Call AddRigaTabella(T7)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
'-------------------------------
'-------------------------------
If S1 > S2 Then S1 = S1 & "+" Else S2 = S2 & "+"
If S2 < S1 Then S2 = S2 & "-" Else S1 = S1 & "-"
'-------------------------------
'-------------------------------
T8 = Array(T8," "," "," "," ",S1,S2," "," "," "," ")
Call AddRigaTabella(T8)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If pari(S3) Then
'-------------------------------
T9 = Array(T9," "," "," "," ",S4,S4," "," "," "," ")
Call AddRigaTabella(T9)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
'-------------------------------
T10 = Array(T10," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T10)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
S1 = Fuori90(A + C)
S2 = Fuori90(B + D)
S3 = Differenza(S1,S2)
S4 = S3/2
If S1 > S2 Then S7 = Fuori90(S1 + S4) Else S7 = Fuori90(S1 - S4)
If S2 < S1 Then S8 = Fuori90(S2 - S4) Else S8 = Fuori90(S2 + S4)
'
'-------------------------------
T11 = Array(T11," "," "," "," ",S7,S8," "," "," "," ")
Call AddRigaTabella(T11)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(6,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(7,RGB(26,217,136),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'-------------------------------
T12 = Array(T12," "," "," "," "," "," "," "," "," "," ")
Call AddRigaTabella(T12)
Call SetColoreCella(1,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(2,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(3,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(4,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(5,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(6,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(7,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(8,RGB(255,255,255),RGB(0,0,0))
Call SetColoreCella(9,RGB(255,255,255),RGB(0,0,0))
'-------------------------------
'
'If rx = S5 Or rx = S1 Or rx = S2 Or rx = S7 Or rx = S8 Then
'
'If Figura(A) = Figura(C) And Figura(B) = Figura(D) Then
'
'-------------------------------
Call SetTableWidth("21%")
CreaTabella
'------------------------------
ruota(1) = r1
ruota(2) = r2
'-----------------------------
ruote(1) = r1
ruote(2) = r2
ruote(3) = 11
ruote(4) = 12
'----------------------------
ambata1(1) =(S5)
'
ambo1(1) = ambata1(1)
ambo1(2) = S1
'----------------
ambo2(1) = ambata1(1)
ambo2(2) = S2
'----------------
'If A = D And B = C Then
ambo3(1) =(S5)
ambo3(2) =(S7)
ambo4(1) =(S5)
ambo4(2) =(S8)
'
cinquina(1) = S5
cinquina(2) = S1
cinquina(3) = S2
cinquina(4) = S7
cinquina(5) = S8
'End If
ImpostaGiocata 1,ambata1,ruota,posta,k
Gioca es,1,,1
Scrivi
ImpostaGiocata 1,ambo1,ruote,poste,k
ImpostaGiocata 2,ambo2,ruote,poste,k
Gioca es,1,,1
Scrivi
Scrivi"-----------------------------"
Scrivi
ImpostaGiocata 1,ambo3,ruote,poste,k
ImpostaGiocata 2,ambo4,ruote,poste,k
Gioca es,1,,1
Scrivi
ImpostaGiocata 1,cinquina,ruote,poste,k
Gioca es,1,,1
Scrivi
'End If
End If
End If
End If
Next
Next
Next
Next
Next
Next
End Sub