]> git.r.bdr.sh - rbdr/corona-regeln/blob - src/lib/rules/group.js
Port to svelte
[rbdr/corona-regeln] / src / lib / rules / group.js
1 const internals ={
2
3 groups: [
4 'teenagers',
5 'influencers',
6 'vegans',
7 'tik-tok users',
8 'lactose intolerants',
9 'households',
10 'ice cream vendors',
11 'babies',
12 'police officers',
13 'drug dealers',
14 'tech workers',
15 'cryptocurrency miners',
16 'mexicans',
17 'smokers',
18 'drug users',
19 'octogenarians',
20 'public officials',
21 'atheists',
22 'god fearing parishioners',
23 'b-list actors',
24 'jugglers',
25 'seagulls',
26 'lighthouse operators',
27 'tram drivers',
28 'psychics',
29 'magicians',
30 'classically trained musicians',
31 'food delivery drivers',
32 'librarians',
33 'doctors',
34 'vaccinated cats',
35 'balloon artists'
36 ],
37 };
38
39 export default function () {
40
41 const countA = Math.floor(Math.random() * 8) + 2;
42 const magnitude = Math.random() > 0.5 ? 99 : 5;
43 const countB = Math.floor(Math.random() * magnitude) + 1;
44 const groupA = internals.groups[Math.floor(Math.random() * internals.groups.length)];
45 const groupB = internals.groups[Math.floor(Math.random() * internals.groups.length)];
46
47 return {
48 emoji: '👨',
49 text: `No more than ${countA} ${groupA} + ${countB} ${groupB} are allowed to meet`
50 };
51 }