I have 15 combinations
and save on array the random number
Local aCombinations:= { {0,0,0,0,0 } ,;
{0,0,0,0,0 } ,;
{0,0,0,0,0 }}
nNumero1 := hb_RandomInt( 0, 9 )
....
aCombinations[1][1]:= nNumero1
aCombinations[1][2]:= nNumero2
aCombinations[1][3]:= nNumero3
aCombinations[1][4]:= nNumero4
aCombinations[1][5]:= nNumero5
aCombinations[2][1]:= nNumero6
aCombinations[2][2]:= nNumero7
aCombinations[2][3]:= nNumero8
aCombinations[2][4]:= nNumero9
aCombinations[2][5]:= nNumero10
aCombinations[3][1]:= nNumero11
aCombinations[3][2]:= nNumero12
aCombinations[3][3]:= nNumero13
aCombinations[3][4]:= nNumero14
aCombinations[3][5]:= nNumero15
I controlled aCombinations with xbrowser
how can I see all the combinations that if all the numbers are the same
for a sample :
for the the horizontal lines (1,2,3),
for diagonally (1,2)
for a sample we can have the first line Horizontal
If nNumero1= Numero2 .and. nNumero2=nNumero3
lWin:= .t.
nlevl:= 3
If nNumero1= Numero2 .and. nNumero2=nNumero3 .and. nNumero3=nNumero4
lWin:= .t.
nLevl:= 4
If nNumero1= Numero2 .and. nNumero2=nNumero3 .and. nNumero3=nNumero4 .and. nNumero4=nNumero5
lWin:= .t.
nLevl:= 5
Endif
Endif
Endif
possible is not a function math we can control the matrice ?
the number init from zero