From 07d8db2bb758686466d4643f575b4b5280cc4791 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sun, 4 Apr 2021 00:45:50 +0200 Subject: Add project --- rules/group.js | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 rules/group.js (limited to 'rules/group.js') diff --git a/rules/group.js b/rules/group.js new file mode 100644 index 0000000..909c378 --- /dev/null +++ b/rules/group.js @@ -0,0 +1,51 @@ +const internals ={ + + groups: [ + 'teenagers', + 'influencers', + 'vegans', + 'tik-tok users', + 'lactose intolerants', + 'households', + 'ice cream vendors', + 'babies', + 'police officers', + 'drug dealers', + 'tech workers', + 'cryptocurrency miners', + 'mexicans', + 'smokers', + 'drug users', + 'octogenarians', + 'public officials', + 'atheists', + 'god fearing parishioners', + 'b-list actors', + 'jugglers', + 'seagulls', + 'lighthouse operators', + 'tram drivers', + 'psychics', + 'magicians', + 'classically trained musicians', + 'food delivery drivers', + 'librarians', + 'doctors', + 'vaccinated cats', + 'balloon artists' + ], +}; + +module.exports = () => { + + const countA = Math.floor(Math.random() * 8) + 2; + const magnitude = Math.random() > 0.5 ? 99 : 5; + const countB = Math.floor(Math.random() * magnitude) + 1; + const groupA = internals.groups[Math.floor(Math.random() * internals.groups.length)]; + const groupB = internals.groups[Math.floor(Math.random() * internals.groups.length)]; + + return { + emoji: '👨', + text: `No more than ${countA} ${groupA} + ${countB} ${groupB} are allowed to meet` + }; +} -- cgit