drawful

drawing game
git clone git://ce9e.org/drawful

commit
318f98aab02248bd1bfa02302380b3250f6d3cfc
parent
9f24ba179235286af4f9efb857069361aef9c3a3
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-12-17 19:25
more words: movies

Diffstat

M words.js 8 +++-----

1 files changed, 3 insertions, 5 deletions


diff --git a/words.js b/words.js

@@ -4,14 +4,12 @@ var animals = ['ant', 'bird', 'cat', 'chicken', 'cow', 'dog', 'elephant', 'fish'
    4     4 var adjectives = ['affectionate', 'agreeable', 'amiable', 'bright', 'charming', 'creative', 'determined', 'energetic', 'friendly', 'funny', 'generous', 'imaginative', 'polite', 'likable', 'gregarious', 'diplomatic', 'sincere', 'helpful', 'giving', 'kind', 'hardworking', 'diligent', 'patient', 'dynamic', 'loyal'];
    5     5 var onomatopoeia = ['chomp', 'cough', 'gargle', 'gibberish', 'hiccup', 'hum', 'whisper', 'bang', 'boom', 'splash', 'whoosh', 'beep', 'zap', 'roar', 'meow', 'pew pew'];
    6     6 var concepts = ['adventure', 'annoyance', 'artistry', 'childhood', 'comfort', 'communication', 'confusion', 'delight', 'disbelief', 'elegance', 'friendship', 'horror', 'kindness', 'luxury', 'pleasure', 'rhythm', 'sensitivity', 'silliness', 'speed', 'truth', 'uncertainty', 'union'];
   -1     7 var movies = ['avengers', 'star wars', 'titanic', 'fast & furious', 'jurassic park', 'batman', 'james bond', 'transformers', 'avatar', 'toy story', 'harry potter', 'lord of the rings', 'finding nemo', 'pirates of the caribbean', 'snowwhite'];
    7     8 
    8     9 export var randomWord = function() {
    9    -1 	var r = Math.random();
   10    -1 	if (r < 0.4) {
   -1    10 	if (Math.random() < 0.2) {
   11    11 		return utils.randomChoice(adjectives) + ' ' + utils.randomChoice(animals);
   12    -1 	} else if (r < 0.7) {
   13    -1 		return utils.randomChoice(onomatopoeia);
   14    12 	} else {
   15    -1 		return utils.randomChoice(concepts);
   -1    13 		return utils.randomChoice([].concat(onomatopoeia, concepts, movies));
   16    14 	}
   17    15 };