définitions
This commit is contained in:
3
dico.php
3
dico.php
@ -27,6 +27,7 @@ foreach ($mots_de_n_lettres as $n => $mots) {
|
||||
|
||||
function mots_espaces($max, $min=0) {
|
||||
global $mots_de_n_lettres;
|
||||
global $dico;
|
||||
|
||||
foreach($mots_de_n_lettres[$max] as $mot) {
|
||||
yield $mot;
|
||||
@ -35,7 +36,9 @@ function mots_espaces($max, $min=0) {
|
||||
foreach ($mots_de_n_lettres[$i] as $mot1) {
|
||||
foreach (mots_espaces($max - $i -1, $min) as $mot2) {
|
||||
if ($mot1 != $mot2) {
|
||||
$dico["$mot1 $mot2"] = $dico[$mot1] && $dico[$mot2] ? "{$dico[$mot1]}. {$dico[$mot2]}." : $dico[$mot1] . $dico[$mot2];
|
||||
yield "$mot1 $mot2";
|
||||
$dico["$mot2 $mot1"] = $dico[$mot2] && $dico[$mot1] ? "{$dico[$mot2]}. {$dico[$mot1]}." : $dico[$mot2] . $dico[$mot1];
|
||||
yield "$mot2 $mot1";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user