forked from DishpitDev/Slopify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemoji-square.js
executable file
ยท239 lines (228 loc) ยท 8.27 KB
/
emoji-square.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#!/usr/bin/env node
// Curated list of developer-friendly emojis
const devEmojis = [
"โจ", // sparkles - new feature
"๐", // rocket - deployment/performance
"๐งฑ", // brick - infrastructure
"๐ฑ", // seedling - initial commit
"๐", // bug - bug fix
"๐ง", // wrench - configuration
"๐จ", // art - styling/UI
"โป๏ธ", // recycle - refactor
"๐ฅ", // fire - remove code/files
"๐ฆ", // package - dependencies
"๐", // lock - security
"๐", // memo - docs
"๐งช", // test tube - testing
"โก๏ธ", // zap - improvement
"๐", // magnifying glass - search
"๐ก", // bulb - idea/solution
"๐๏ธ", // construction - WIP
"๐ฏ", // target - goals/focus
"๐ ๏ธ", // tools - development tools
"๐งน", // broom - cleanup
"๐ง", // construction - WIP
"๐", // chart - analytics
"๐", // plug - plugins
"๐งฉ", // puzzle - solving
"๐ฎ", // game - fun stuff
"๐จ", // hammer - build
"๐ฑ", // mobile - mobile development
"๐ฅ๏ธ", // desktop - desktop apps
"๐", // globe - web development
"๐", // locked with key - enhanced security
"๐", // trending up - performance improvement
"๐", // arrows in circle - synchronization
"๐พ", // floppy disk - save
"๐๏ธ", // wastebasket - delete
"๐ก", // satellite - network/API
"๐", // link - connections
"โ๏ธ", // gear - settings
"๐", // gift - release
"๐จ", // emergency light - critical issues
"๐ซ", // dizzy - animations
"๐ญ", // masks - testing environments
"๐ฎ", // crystal ball - predictions/ML
"๐ช", // circus tent - deployment environment
"๐ข", // roller coaster - development cycles
"๐ก", // ferris wheel - continuous integration
"๐ ", // carousel - version control
"๐ช", // circus tent - staging
"๐", // rainbow - diversity in code
"๐", // wave - data flow
"๐", // volcano - major breaking changes
"๐ฝ", // liberty - open source
"๐ต", // music note - audio features
"๐ฌ", // clapper board - video features
"๐ธ", // camera - image processing
"๐", // battery - optimization
"๐ป", // laptop - development
"๐จ๏ธ", // printer - output
"โจ๏ธ", // keyboard - input
"๐ฑ๏ธ", // mouse - user interface
"๐บ", // tv - display
"๐ฑ", // mobile phone - responsive design
"๐", // magnifying glass tilted right - deep search
"๐", // magnifying glass tilted left - search
"๐ก", // satellite dish - API endpoints
"๐ฐ๏ธ", // satellite - cloud services
"๐ฆ", // traffic light - status indicators
"โ", // anchor - stable release
"๐งญ", // compass - navigation
"๐ฏ", // direct hit - precision fixes
"๐ฒ", // game die - random functions
"๐ฑ", // trident - powerful features
"โ๏ธ", // crossed swords - merge conflicts
"๐ก๏ธ", // shield - security measures
"โ๏ธ", // balance scale - load balancing
"๐งฎ", // abacus - calculations
"๐ญ", // telescope - long-term planning
"๐ฌ", // microscope - detailed analysis
"๐", // graduation cap - learning/tutorials
"๐", // books - documentation
"๐", // party popper - celebration/launch
"๐", // glowing star - featured/important
"๐", // bell - notifications
"๐๏ธ", // level slider - adjustments
"๐๏ธ", // control knobs - fine tuning
"๐งฐ", // toolbox - utilities
"๐๏ธ", // file cabinet - storage
"๐ฅ", // inbox - downloads/imports
"๐ค", // outbox - uploads/exports
"๐", // bookmark - saved/favorites
"๐", // pushpin - pinned items
"๐ท๏ธ", // label - tags
"๐๏ธ", // card file box - databases
"๐", // clipboard - copy/paste
"๐๏ธ", // newspaper - news/updates
"๐ฐ", // newspaper - blog/articles
"๐", // bookmark tabs - multiple pages
"๐", // high brightness - display settings
"๐", // fireworks - celebrations
"๐ ", // shooting star - wishes/goals
"๐จ", // artist palette - design
"๐ผ๏ธ", // framed picture - images
"๐น", // musical keyboard - audio
"๐บ", // trumpet - announcements
"๐ข", // loudspeaker - broadcasts
"๐", // speaker high volume - sound
"๐๏ธ", // studio microphone - voice/audio
"๐", // earth globe europe-africa - global
"๐ฉ", // nut and bolt - technical details
"๐", // paperclip - attachments
"๐ณ", // bowling - strike/success
"๐ฐ", // slot machine - random generation
"๐ฒ", // game die - chance/probability
"๐ฏ", // dart - precision/accuracy
"๐ช", // circus tent - big deployment
"๐ญ", // performing arts - UI/UX
"๐จ", // artist palette - design
"๐ฌ", // clapper board - preview
"๐ฝ๏ธ", // film projector - video
"๐๏ธ", // film frames - animation
"๐ท", // camera - snapshot
"๐ฅ", // movie camera - recording
"๐น", // video camera - streaming
"๐ฆ", // flashlight - debugging
"๐", // gem stone - optimization
"๐", // key - authentication
"๐๏ธ", // old key - legacy systems
"๐จ", // incoming envelope - messages
"โ๏ธ", // envelope - email
"๐ซ", // mailbox - inbox
"๐ฌ", // mailbox with mail - notifications
"๐ญ", // mailbox with no mail - empty state
"๐ฎ", // postbox - outbox
"๐ณ๏ธ", // ballot box - voting/polling
"โ๏ธ", // pencil - edit
"๐", // memo - notes
"๐", // green book - environment
"๐", // blue book - blueprint
"๐", // orange book - documentation
"๐", // notebook - logging
"๐", // notebook with decorative cover - styling
"๐", // ledger - tracking
"๐", // closed book - completed
"๐", // bookmark - saved
"๐ท๏ธ", // label - tagging
"๐", // triangular ruler - measuring
"๐", // straight ruler - alignment
"โ๏ธ", // scissors - cut/crop
"๐๏ธ", // linked paperclips - connections
"๐", // round pushpin - location
"๐๏ธ", // wastebasket - delete
"๐ฒ๏ธ", // trackball - navigation
"๐ฎ", // video game - gaming
"๐น๏ธ", // joystick - control
"๐ฒ", // game die - random
"๐", // joker - wild card
"๐ด", // flower playing cards - patterns
"๐", // mahjong red dragon - complexity
"๐ฏ", // direct hit - target
"๐ฑ", // pool 8 ball - decision
"๐ฎ", // crystal ball - prediction
"๐ช", // circus tent - deployment
"๐ญ", // performing arts - presentation
"๐ผ๏ธ", // framed picture - preview
"๐จ", // artist palette - theme
"๐งต", // thread - connection
"๐งถ", // yarn - dependency
"๐", // round pushpin - location
"๐", // barber pole - service
"๐๏ธ", // reminder ribbon - todo
"๐๏ธ", // admission tickets - access
"๐ซ", // ticket - license
"๐ช", // circus tent - event
"๐ญ", // performing arts - demo
"๐จ", // artist palette - design
"๐ฌ", // clapper board - preview
"๐ค", // microphone - voice
"๐ง", // headphone - audio
"๐ผ", // musical score - sequence
"๐น", // musical keyboard - input
"๐ท", // saxophone - jazz
"๐บ", // trumpet - announcement
"๐ธ", // guitar - acoustic
"๐ป", // violin - classical
"๐ฅ", // drum - rhythm
"๐ฏ", // direct hit - target
"๐ณ", // bowling - strike
"๐ฎ", // video game - gaming
];
// Define square size
const size = 6;
const rowLength = size;
const totalEmojis = size * rowLength;
// Get unique emojis by converting to Set and back to array
const uniqueEmojis = [...new Set(devEmojis)];
// Ensure we have enough unique emojis
if (totalEmojis > uniqueEmojis.length) {
console.error(
`Not enough unique emojis available. Need ${totalEmojis} but only have ${uniqueEmojis.length} unique emojis`
);
process.exit(1);
}
// Get random emojis for the square
const selectedEmojis = [];
const availableEmojis = [...uniqueEmojis];
for (let row = 0; row < size; row++) {
let currentRow = "";
for (let col = 0; col < rowLength; col++) {
// Pick random emoji from remaining available ones
const randomIndex = Math.floor(Math.random() * availableEmojis.length);
const emoji = availableEmojis[randomIndex];
// Remove used emoji from available pool
availableEmojis.splice(randomIndex, 1);
currentRow += emoji + " ".repeat(4);
}
selectedEmojis.push(currentRow);
}
// Print the square with consistent spacing
console.log(" ".repeat(4));
console.log("Example Emojis:");
console.log(" ".repeat(4));
for (let i = 0; i < size; i++) {
console.log(selectedEmojis[i]);
console.log(); // Add blank line between rows
}
console.log(" ".repeat(4));