Ho utilizzato un obbrobbrio del genere:

Codice PHP:
<?php
$a 
= array("a1""ax""a2");
$b = array("b1""bx""b2");
$c = array("c1""cx""c2");
$d = array("d1""dx""d2");
$e = array("e1""ex""e2");
$f = array("f1""fx""f2");
$g = array("g1""gx""g2");
$h = array("h1""hx""h2");
$ris = array();
$c1=0;
while(
$c1 count($a)) {
             
$c2=0;
while (
$c2 count($b)) {
                                                
$c3=0;
while (
$c3 count($c)) {

$c4=0;
while (
$c4 count($d)) {

$c5=0;
while (
$c5 count($e)) {

$c6=0;
while (
$c6 count($f)) {

$c7=0;
while (
$c7 count($g)) {

$c8=0;
while (
$c8 count($h)) {

$push$a[$c1]." - ".$b[$c2]." - ".$c[$c3]." - ".$d[$c4]." - ".$e[$c5]." - ".$f[$c6]." - ".$g[$c7]." - ".$h[$c8];

array_push ($ris,  $push);

echo 
$push."
"
;
                                                             
$c8++;
                        }                                                         
$c7++;
                        }                                                                     
$c6++;
                        }                                                                 
$c5++;
                        }                                                                 
$c4++;
                        }                                                                 
$c3++;
                        }
$c2++;
                        }
$c1++;
                        }

echo 
count($ris);

?>

Sono 6500 combinazioni e passa.... :master: mi sa che devo creare una formula di riduzione ora.. tipo togliere le giocate impossibili e quelle basate su vittorie mooolto improbabili.. conto di sfoltire fino a 500 giocate... la strada è in salita però..... :|