aboutsummaryrefslogtreecommitdiff
path: root/lib/jdtalk/core.d
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2019-07-20 12:37:07 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2019-07-20 12:37:07 -0400
commit0c8f8653bba0fa63ceda5dfc0f5f5ba917e472e1 (patch)
tree1b79dacdc06674665c698619fdc87374e04fa82a /lib/jdtalk/core.d
parent071192f159f22b7d2cbd318f78456593835420db (diff)
downloadjdtalk-0c8f8653bba0fa63ceda5dfc0f5f5ba917e472e1.tar.gz
Implement "salad" mode
Diffstat (limited to 'lib/jdtalk/core.d')
-rw-r--r--lib/jdtalk/core.d9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/jdtalk/core.d b/lib/jdtalk/core.d
index f3023b2..c0fc376 100644
--- a/lib/jdtalk/core.d
+++ b/lib/jdtalk/core.d
@@ -177,3 +177,12 @@ string talk(ref dict_t dict) {
" ");
return output;
}
+
+string talkSalad(ref dict_t dict, int words) {
+ string[] salad;
+ for (int i = 0; i < words; i++) {
+ string[] wordList = [dict.noun, dict.verb, dict.adverb, dict.adjective].choice;
+ salad ~= word(wordList);
+ }
+ return salad.join(" ");
+}