aboutsummaryrefslogtreecommitdiff
path: root/lib/corona-regeln.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/corona-regeln.js')
-rw-r--r--lib/corona-regeln.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/corona-regeln.js b/lib/corona-regeln.js
new file mode 100644
index 0000000..5036e47
--- /dev/null
+++ b/lib/corona-regeln.js
@@ -0,0 +1,17 @@
+'use strict';
+
+const RuleGenerator = require('./rule_generator');
+
+module.exports = {
+ async run({
+ ruleCount
+ }) {
+
+ const rules = [];
+ for (let i = 0; i < ruleCount; ++i) {
+ rules.push(await RuleGenerator.generate());
+ }
+
+ return rules.sort(() => Math.random() - 0.5);
+ }
+}