Tocmai am invatat despre matrici, si diferenta dintre matrici unidimensionale si un string nu e chiar mare, asa ca mi-a venit o idee : sa fac un inventator de cuvinte ! L-am terminat in 2 zile
.
In prima zi am facut partea de baza a programului care creeaza cuvantul , aleatoriu( dar te lasa sa alegi numarul de litere). Insa am ramas dezamagit cand am vazut ca sunt majoritatea cuvinte de genu “treklgffdbl”. Astazi m-am gandit la un algoritm ce verifica consoanele si vocalele, pentru un cuvant care suna cat mai natural. Programul functioneaza cam asa : se genereaza o litera aleatorie(vocala sau consoana) care se atribuie casutei curente din matrice. Se trece la urmatoarea casuta, se genereaza o alta litera(vocala sau consoana). Se trece la urmatoarea casuta, daca si a treia litera de la ultima vocala este tot o consoana, se genereaza aleatoriu o vocala. Si functioneaza ! Bine, cuvintele n-au nici o noima dar … e doar spre amuzament
. Poate vreti careva sa faceti o noua klingoniana
.
Uite cateva cuvinte rezultate pentru 7 litere:
Here are some words that were generated for 7 characters :
ogamate,agimuto,okaqaaa,avaeilo,aneuxau,ukaruoe.
Mda … stiu, foarte ciudate =)). Link de download mai jos
ENGLISH
Ok so you may already read the words, they are very weird. It’s about a program that makes words, but words without a meaning. I tried to make them sound natural. When I first created the program the results were something like “gfdbgjkfd”. That’s really not looking like a word is it ?
My program is generating in an array a random character(vowel or consonant). It then moves to the next box of the array and generates another character(vowel or consonant). Then it moves to the next box, and if the third character after the last vowel is still a consonant, it won’t generate a consonant but instead a vowel, randomly of course.
I made this program just for fun, so …. here’s the download link !
|==<<<<||DOWNLOAD||>>>>==|
BETA3 now available !
This optimized version generates words instantly, and extremely fast if you choose to generate a lot of words at once ( yes, it’s now possible
). I also optimized a little the code, so it’s not so buggy anymore. Download link here :
[EDIT] For some strange reason, you may have to open, close and reopen 2 or 3 times the program in order for it to generate readable words. I really don’t know why it does this. It’s odd, I know, but it works after that. Oh, the program only runs on Windows OS.
|==<<<<||DOWNLOAD-Beta3||>>>>==|
Like this:
Be the first to like this post.