définitions

This commit is contained in:
2025-04-24 04:54:58 +02:00
parent b70b8cdc56
commit 1075f4e9e8
5 changed files with 2505 additions and 2470 deletions

View File

@ -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";
}
}