1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
/*mots de la liste*/
mot_liste(banal).
mot_liste(herse).
mot_liste(coute).
mot_liste(beton).
mot_liste(cales).
mot_liste(canal).
mot_liste(raler).
mot_liste(hesse).
mot_liste(coule).
mot_liste(seton).
/*partie du dictionnaire*/
mots(abaca).
mots(abats).
mots(abbes).
mots(abces).
mots(abdos).
mots(abees).
mots(abers).
mots(abeti).
mots(abies).
mots(abima).
mots(abime).
mots(ables).
mots(aboie).
mots(abois).
mots(bogie).
mots(cagou).
/*mot rechercher*/
mot_rechercher(L1):-dictio_en_liste(L1),mot_composer_a_partir_de_liste(L1).
/*decompose un mot du dictionnaire en liste*/
dictio_en_liste(F):-mots(X),atom_chars(X,F).
/*mots composer à partir de liste et qui respecte la contrainte
(c'est le prédicat qui reste a écrire)
mot_composer_a_partir_de_liste(E):-E=[J,K,U,I,O],*/
/*decomposer les mots de la liste en 10 listes différentes de 5lettre */
decomposer_les_mots_de_la_liste(S1,S2,S3,S4,S5,S6,S7,S8,S9,S10):-mot_en_liste(S1),mot_en_liste(S2),mot_en_liste(S3),mot_en_liste(S4),
mot_en_liste(S5),mot_en_liste(S6),mot_en_liste(S7),mot_en_liste(S8),mot_en_liste(S9),mot_en_liste(S10),
S1\==S2,S1\==S3,S1\==S4,S1\==S5,S1\==S6,S1\==S7,S1\==S8,S1\==S9,S1\==S10,
S2\==S3,S2\==S4,S2\==S5,S2\==S6,S2\==S7,S2\==S8,S2\==S9,S2\==S10,
S3\==S4,S3\==S5,S3\==S6,S3\==S7,S3\==S8,S3\==S9,S3\==S10,
S4\==S5,S4\==S6,S4\==S7,S4\==S8,S4\==S9,S4\==S10,
S5\==S6,S5\==S7,S5\==S8,S5\==S9,S5\==S10,
S6\==S7,S6\==S8,S6\==S9,S6\==S10,
S7\==S8,S7\==S9,S7\==S10,
S8\==S9,S8\==S10,
S9\==S10.
/*decompose un mot de la liste des 10 mots en liste*/
mot_en_liste(Q):-mot_liste(X),atom_chars(X,Q). |
Partager