- commit
- d718ccc382b8f48606eea1d6b90afd2e35034c75
- parent
- 3f659fa9d54587cbb79ea8bcd1757ea99ffb3ce3
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2020-12-17 18:31
add random options
Diffstat
| M | drawful.js | 3 | +++ |
1 files changed, 3 insertions, 0 deletions
diff --git a/drawful.js b/drawful.js
@@ -92,6 +92,9 @@ document.querySelector('#lie-host').addEventListener('submit', function(event) {
92 92 for (var player in state.lies) {
93 93 options.push(state.lies[player]);
94 94 }
-1 95 while (options.length < 5) {
-1 96 options.push(words.randomWord());
-1 97 }
95 98 send('setOptions', utils.shuffle(options));
96 99 html.setView('pick-host');
97 100 });