-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexcuses.js
More file actions
371 lines (353 loc) · 18 KB
/
Copy pathexcuses.js
File metadata and controls
371 lines (353 loc) · 18 KB
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
export const CATEGORIES = [
{ key: 'all', label: 'All' },
{ key: 'physical', label: 'Body' },
{ key: 'mental', label: 'Nerves' },
{ key: 'equipment', label: 'Kit' },
{ key: 'weather', label: 'Weather' },
{ key: 'course', label: 'Course' },
{ key: 'distraction', label: 'Distractions' },
{ key: 'bad_luck', label: 'Luck' },
{ key: 'skill', label: 'Swing' },
];
export const EXCUSES = [
{ text: "Leg day.", tags: ['physical'] },
{ text: "Back's tight.", tags: ['physical'] },
{ text: "Two hours of sleep.", tags: ['physical'] },
{ text: "I slipped.", tags: ['physical'] },
{ text: "Jacket's too tight.", tags: ['physical'] },
{ text: "Too bloated to rotate.", tags: ['physical'] },
{ text: "Lumbago.", tags: ['physical'] },
{ text: "Legs are dead.", tags: ['physical'] },
{ text: "New knees.", tags: ['physical'] },
{ text: "Can't feel anything today.", tags: ['physical'] },
{ text: "Aches and pains.", tags: ['physical'] },
{ text: "Foot slipped.", tags: ['physical'] },
{ text: "Too much coffee, hands shaky.", tags: ['physical'] },
{ text: "Tee time was too early.", tags: ['physical'] },
{ text: "Bad back.", tags: ['physical'] },
{ text: "Tore my Achilles.", tags: ['physical'] },
{ text: "Glutes aren't firing.", tags: ['physical'] },
{ text: "Gym this morning.", tags: ['physical'] },
{ text: "Working on something new.", tags: ['mental'] },
{ text: "Overthinking the putt.", tags: ['mental'] },
{ text: "I play better alone.", tags: ['mental'] },
{ text: "No warm up.", tags: ['mental'] },
{ text: "You warmed up, I didn't.", tags: ['mental'] },
{ text: "3-footers kill me.", tags: ['mental'] },
{ text: "Still thinking about last year's triple.", tags: ['mental'] },
{ text: "Left my swing at home.", tags: ['mental'] },
{ text: "Cart path only threw me off.", tags: ['mental'] },
{ text: "Was striping it at the range.", tags: ['mental'] },
{ text: "Haven't hit the range in weeks.", tags: ['mental'] },
{ text: "Worst round in five years.", tags: ['mental'] },
{ text: "Just once, my normal game.", tags: ['mental'] },
{ text: "Didn't want to fly the green.", tags: ['mental'] },
{ text: "Pin's tucked too tight.", tags: ['mental'] },
{ text: "Never charge a downhill putt.", tags: ['mental'] },
{ text: "30-footers? Easy. 3-footers? Done.", tags: ['mental'] },
{ text: "Practice green? Money. Course? Gone.", tags: ['mental'] },
{ text: "Negative thoughts.", tags: ['mental'] },
{ text: "Lost concentration.", tags: ['mental'] },
{ text: "New course.", tags: ['mental'] },
{ text: "Visualized the wrong shot.", tags: ['mental'] },
{ text: "Should've watched a tips video.", tags: ['mental'] },
{ text: "Never taken a lesson.", tags: ['mental'] },
{ text: "Haven't played in 3 years.", tags: ['mental'] },
{ text: "Didn't play as a kid.", tags: ['mental'] },
{ text: "Over-practiced.", tags: ['mental'] },
{ text: "Wrong club.", tags: ['equipment'] },
{ text: "Need a ball that goes straight.", tags: ['equipment'] },
{ text: "Defective ball.", tags: ['equipment'] },
{ text: "Need new clubs.", tags: ['equipment'] },
{ text: "150 marker's wrong.", tags: ['equipment'] },
{ text: "Glove's too tight.", tags: ['equipment'] },
{ text: "Wrong ball.", tags: ['equipment'] },
{ text: "Cracked tee.", tags: ['equipment'] },
{ text: "Love these new clubs!", tags: ['equipment'] },
{ text: "Hate these new clubs!", tags: ['equipment'] },
{ text: "Ball's cracked.", tags: ['equipment'] },
{ text: "I hate that driver.", tags: ['equipment'] },
{ text: "Obviously the wrong club.", tags: ['equipment'] },
{ text: "Yardage must be wrong.", tags: ['equipment'] },
{ text: "Defective ball, statistically.", tags: ['equipment'] },
{ text: "Kids' clubs all week.", tags: ['equipment'] },
{ text: "Grooves are worn out.", tags: ['equipment'] },
{ text: "Between clubs. Picked wrong.", tags: ['equipment'] },
{ text: "Sand wedge has a mind of its own.", tags: ['equipment'] },
{ text: "Putter face was open.", tags: ['equipment'] },
{ text: "Plumb bob lied.", tags: ['equipment'] },
{ text: "Changed putters before the round.", tags: ['equipment'] },
{ text: "Trying new balls.", tags: ['equipment'] },
{ text: "Rangefinder lied.", tags: ['equipment'] },
{ text: "Breaking in new grips.", tags: ['equipment'] },
{ text: "Lucky ball's in the water.", tags: ['equipment'] },
{ text: "Should've clubbed up.", tags: ['equipment'] },
{ text: "Testing a new shaft.", tags: ['equipment'] },
{ text: "App gave wrong distance.", tags: ['equipment'] },
{ text: "Worn-out shoe soles.", tags: ['equipment'] },
{ text: "Putter's twisted.", tags: ['equipment'] },
{ text: "Ball's ruined.", tags: ['equipment'] },
{ text: "It's my loft.", tags: ['equipment'] },
{ text: "Forgot to charge my clubs.", tags: ['equipment'] },
{ text: "GPS said 150. Rangefinder said 145. Hit 200.", tags: ['equipment'] },
{ text: "Barometric pressure.", tags: ['weather'] },
{ text: "The glare.", tags: ['weather'] },
{ text: "Too hot.", tags: ['weather'] },
{ text: "Too cold.", tags: ['weather'] },
{ text: "Could barely swing, too cold.", tags: ['weather'] },
{ text: "Wind picked up mid-swing.", tags: ['weather'] },
{ text: "Sun in my eyes.", tags: ['weather'] },
{ text: "Wind changed.", tags: ['weather'] },
{ text: "Too sunny.", tags: ['weather'] },
{ text: "Wind got it.", tags: ['weather'] },
{ text: "Wind took it.", tags: ['weather'] },
{ text: "Sudden gust, did you feel that?", tags: ['weather'] },
{ text: "Hands too sweaty.", tags: ['weather'] },
{ text: "Ball feels like a rock.", tags: ['weather'] },
{ text: "Can't play in this heat.", tags: ['weather'] },
{ text: "Wind didn't cooperate.", tags: ['weather'] },
{ text: "Wind carried it over.", tags: ['weather'] },
{ text: "Frickin' wind!", tags: ['weather'] },
{ text: "Course was too wet.", tags: ['course'] },
{ text: "Uneven greens.", tags: ['course'] },
{ text: "Grass was wrong length.", tags: ['course'] },
{ text: "Sprinkler head.", tags: ['course'] },
{ text: "Bad lie.", tags: ['course'] },
{ text: "Rolled too far.", tags: ['course'] },
{ text: "Didn't roll at all.", tags: ['course'] },
{ text: "Putt broke more than expected.", tags: ['course'] },
{ text: "Greens are too fast.", tags: ['course'] },
{ text: "Greens are too bumpy.", tags: ['course'] },
{ text: "Hate this bunker sand.", tags: ['course'] },
{ text: "Sand was too fluffy.", tags: ['course'] },
{ text: "Greens aren't watered enough.", tags: ['course'] },
{ text: "Too much dew.", tags: ['course'] },
{ text: "Fringe was against me.", tags: ['course'] },
{ text: "Ball sitting down in the rough.", tags: ['course'] },
{ text: "Stimp's at least 14.", tags: ['course'] },
{ text: "Grain went the other way.", tags: ['course'] },
{ text: "Spike marks.", tags: ['course'] },
{ text: "Cruel pin placement.", tags: ['course'] },
{ text: "That divot wasn't there yesterday.", tags: ['course'] },
{ text: "Mud ball.", tags: ['course'] },
{ text: "Ground too soft.", tags: ['course'] },
{ text: "Lie was worse than it looked.", tags: ['course'] },
{ text: "Someone talked in my backswing.", tags: ['distraction'] },
{ text: "Someone hollered.", tags: ['distraction'] },
{ text: "Heard a glove come off.", tags: ['distraction'] },
{ text: "Group ahead is too slow.", tags: ['distraction'] },
{ text: "Squirrel stared at me.", tags: ['distraction'] },
{ text: "Standing too close.", tags: ['distraction'] },
{ text: "Someone coughed.", tags: ['distraction'] },
{ text: "Bug in my face.", tags: ['distraction'] },
{ text: "Phone's dead, can't focus.", tags: ['distraction'] },
{ text: "Cart whiplash.", tags: ['distraction'] },
{ text: "Got rushed.", tags: ['distraction'] },
{ text: "Stop laughing.", tags: ['distraction'] },
{ text: "Too much waiting.", tags: ['distraction'] },
{ text: "Group behind is too fast.", tags: ['distraction'] },
{ text: "Airplane flew over.", tags: ['distraction'] },
{ text: "Bird dive-bombed me.", tags: ['distraction'] },
{ text: "Someone smacking gum.", tags: ['distraction'] },
{ text: "Don't talk to my ball.", tags: ['distraction'] },
{ text: "Groundhog.", tags: ['distraction'] },
{ text: "Somebody moved.", tags: ['distraction'] },
{ text: "Shadow crossed my line.", tags: ['distraction'] },
{ text: "Saw my shadow.", tags: ['distraction'] },
{ text: "Watch buzzed.", tags: ['distraction'] },
{ text: "Marshal was staring.", tags: ['distraction'] },
{ text: "Partner breathed too loud.", tags: ['distraction'] },
{ text: "There was a bee!", tags: ['distraction'] },
{ text: "Phone vibrated.", tags: ['distraction'] },
{ text: "Did you hear that???", tags: ['distraction'] },
{ text: "Rolled back into the bunker.", tags: ['bad_luck'] },
{ text: "Unlucky bounce.", tags: ['bad_luck'] },
{ text: "Bounces weren't going my way.", tags: ['bad_luck'] },
{ text: "Was this OB last week?", tags: ['bad_luck'] },
{ text: "Who planted that tree?", tags: ['bad_luck'] },
{ text: "Who puts a bunker there?", tags: ['bad_luck'] },
{ text: "Bunker lip was way higher.", tags: ['bad_luck'] },
{ text: "Golf Gods hate me.", tags: ['bad_luck'] },
{ text: "Ball mark changed the break.", tags: ['bad_luck'] },
{ text: "Ball aimed for the water.", tags: ['bad_luck'] },
{ text: "Found water with no hazard.", tags: ['bad_luck'] },
{ text: "Course swallowed it.", tags: ['bad_luck'] },
{ text: "Trees jumped out.", tags: ['bad_luck'] },
{ text: "Hole rejected me.", tags: ['bad_luck'] },
{ text: "Bad luck.", tags: ['bad_luck'] },
{ text: "Perfect if that tree wasn't there.", tags: ['bad_luck'] },
{ text: "Ball had other plans.", tags: ['bad_luck'] },
{ text: "New swing, bedding it in.", tags: ['skill'] },
{ text: "Inconsistency is my trademark.", tags: ['skill'] },
{ text: "Fly fishing or golfing?", tags: ['skill'] },
{ text: "Lifted my head.", tags: ['skill'] },
{ text: "Swinging like a football bat.", tags: ['skill'] },
{ text: "Failed to snap load.", tags: ['skill'] },
{ text: "Tee too low.", tags: ['skill'] },
{ text: "Tee too high.", tags: ['skill'] },
{ text: "Skulled the chip.", tags: ['skill'] },
{ text: "Bump-and-run didn't bump or run.", tags: ['skill'] },
{ text: "Decelerated.", tags: ['skill'] },
{ text: "Didn't commit.", tags: ['skill'] },
{ text: "Looked up.", tags: ['skill'] },
{ text: "Arms ahead of hips.", tags: ['skill'] },
{ text: "Weird hitch.", tags: ['skill'] },
{ text: "Inside out.", tags: ['skill'] },
{ text: "Hit behind it.", tags: ['skill'] },
{ text: "Face was open.", tags: ['skill'] },
{ text: "Hosel rocket.", tags: ['skill'] },
{ text: "Heeled it.", tags: ['skill'] },
{ text: "Right line, wrong speed.", tags: ['skill'] },
{ text: "Right speed, wrong line.", tags: ['skill'] },
{ text: "Left my draws at home.", tags: ['skill'] },
{ text: "Good bogey hole.", tags: ['mental'] },
{ text: "Not losing my Tour card.", tags: ['mental'] },
{ text: "I usually slice, why is it straight?", tags: ['mental'] },
{ text: "Great at mini golf.", tags: ['mental'] },
{ text: "Hole's not regulation.", tags: ['course'] },
{ text: "Gonna be one heck of a par.", tags: ['mental'] },
{ text: "Thinking about going pro.", tags: ['mental'] },
{ text: "Too strong for this game.", tags: ['mental'] },
{ text: "Lie was too perfect.", tags: ['course'] },
{ text: "Green read it differently.", tags: ['course'] },
{ text: "Hole moved.", tags: ['course'] },
{ text: "Aggressive green reading.", tags: ['mental'] },
{ text: "Nice lag.", tags: ['mental'] },
{ text: "That's not OB, alternative fairway.", tags: ['mental'] },
{ text: "I know where it is. Can't get to it.", tags: ['mental'] },
{ text: "Scenic route to the green.", tags: ['mental'] },
{ text: "It's a power fade.", tags: ['skill'] },
{ text: "At least I go again.", tags: ['mental'] },
{ text: "Different strategy.", tags: ['mental'] },
{ text: "Saving good shots for the back nine.", tags: ['mental'] },
{ text: "Prefer the rough.", tags: ['mental'] },
{ text: "Ball just disagreed.", tags: ['bad_luck'] },
{ text: "Strategic fairway search.", tags: ['mental'] },
{ text: "Right shot, wrong hole.", tags: ['skill'] },
{ text: "Problem happened after impact.", tags: ['skill'] },
{ text: "Better angle from here.", tags: ['mental'] },
{ text: "Ball usually listens.", tags: ['bad_luck'] },
{ text: "Playing it like the architect intended.", tags: ['course'] },
{ text: "Paid for the whole course.", tags: ['mental'] },
{ text: "Got hit by a car.", tags: ['bad_luck'] },
{ text: "Underwear riding up.", tags: ['distraction'] },
{ text: "Snake might be in there.", tags: ['distraction'] },
{ text: "Need a manicure first.", tags: ['distraction'] },
{ text: "Standing too close to the course.", tags: ['bad_luck'] },
{ text: "Wind in my eyes.", tags: ['weather'] },
{ text: "Pick up for a double?", tags: ['bad_luck'] },
{ text: "Told Beyoncé not to text me.", tags: ['distraction'] },
{ text: "Earth's rotation.", tags: ['bad_luck'] },
{ text: "Left-handed ball.", tags: ['equipment'] },
{ text: "Born insufficiently talented.", tags: ['skill'] },
{ text: "Stepped on the rake.", tags: ['bad_luck'] },
{ text: "Four putts build character.", tags: ['mental'] },
{ text: "Yelled fore, ball didn't listen.", tags: ['bad_luck'] },
{ text: "One under a tree, bush, and water.", tags: ['bad_luck'] },
{ text: "Don't have a caddie.", tags: ['equipment'] },
{ text: "Mostly moved earth.", tags: ['bad_luck'] },
{ text: "That's why I ate that.", tags: ['distraction'] },
{ text: "Mulligan on each hole.", tags: ['bad_luck'] },
{ text: "What game is this?", tags: ['mental'] },
{ text: "I blinked.", tags: ['distraction'] },
{ text: "Pulled a muscle reaching for scorecard.", tags: ['physical'] },
{ text: "Blamed the pants.", tags: ['equipment'] },
{ text: "LOFT — lack of talent.", tags: ['skill'] },
{ text: "Need the bathroom.", tags: ['distraction'] },
{ text: "Spacetime bends left around my driver.", tags: ['bad_luck'] },
{ text: "Better if I was better at golf.", tags: ['skill'] },
{ text: "I was in the pool!", tags: ['distraction'] },
{ text: "Earth rotated under it.", tags: ['bad_luck'] },
{ text: "Get lessons", tags: ['mental'] },
{ text: "I’ve got a hip thing from High School baseball", tags: ['physical'] },
{ text: "I'm really getting my moneys worth", tags: ['mental'] },
{ text: "At least I get to play more golf than you", tags: ['mental'] },
{ text: "That's where the hole is next week.", tags: ['course'] },
{ text: "Gravity was unusually strong today", tags: ['bad_luck'] },
{ text: "I'm working through a swing change", tags: ['skill'] },
{ text: "Wind grabbed it out of the air", tags: ['weather'] },
{ text: "Had to be mud on that ball", tags: ['course'] },
{ text: "I just started using these new balls, and they are NOT what I am used to", tags: ['equipment'] },
{ text: "Did you hear that?!? Right in my backswing…..", tags: ['distraction'] },
{ text: "I think the GPS on these carts is WAY off", tags: ['equipment'] },
{ text: "My neck is so stiff, I think I slept wrong last night", tags: ['physical'] },
{ text: "This tee box is not level at all", tags: ['course'] },
{ text: "Can’t believe I hit it straight, that never happens to me!", tags: ['mental'] },
{ text: "Bird chirped in my backswing", tags: ['distraction'] },
{ text: "Accidentally farted in the backswing instead of the down swing.", tags: ['distraction'] },
{ text: "Something's wrong with this club", tags: ['equipment'] },
{ text: "I didn't account for the Coriolis effect.", tags: ['bad_luck'] },
{ text: "Still figuring these clubs out", tags: ['equipment'] },
{ text: "Forgot to breathe on the backswing.", tags: ['mental'] },
{ text: "Just scouting the next hole.", tags: ['distraction'] },
];
export const EXCUSE_COUNT = EXCUSES.length;
const TEXT_TO_NUMBER = new Map(EXCUSES.map((e, i) => [e.text, i + 1]));
export function getExcuseNumber(text) {
return TEXT_TO_NUMBER.get(text) || null;
}
export const CATEGORY_KEYS = CATEGORIES.filter((c) => c.key !== 'all').map((c) => c.key);
export const CATEGORY_META = {
physical: {
label: 'Body',
headline: 'Body & Injury Excuses',
blurb: 'Tight back, dead legs, two hours of sleep. The classics for when the body is the alibi.',
},
mental: {
label: 'Nerves',
headline: 'Mental Game Excuses',
blurb: 'Overthinking the putt, no warm-up, working on something new. For when the round was lost between the ears.',
},
equipment: {
label: 'Kit',
headline: 'Equipment Excuses',
blurb: 'Wrong club, defective ball, twisted putter. Blame the gear — that is what it is for.',
},
weather: {
label: 'Weather',
headline: 'Weather Excuses',
blurb: 'Wind, glare, barometric pressure, suspicious humidity. The atmosphere is rarely innocent.',
},
course: {
label: 'Course',
headline: 'Course Condition Excuses',
blurb: 'Aerated greens, fast carts, unmown rough. The golf course did not want you to score.',
},
distraction: {
label: 'Distractions',
headline: 'Distraction Excuses',
blurb: 'A bird, a fart, a coin in the next group. Something moved at the wrong moment.',
},
bad_luck: {
label: 'Luck',
headline: 'Bad Luck Excuses',
blurb: 'Rub-of-the-green rulings — the ball did its own thing.',
},
skill: {
label: 'Swing',
headline: 'Swing Excuses',
blurb: 'Mechanics, tempo, a backswing that left town. For days the swing simply was not there.',
},
};
export function getExcusesByTag(tag) {
return EXCUSES
.map((e, i) => ({ text: e.text, tags: e.tags, number: i + 1 }))
.filter((e) => Array.isArray(e.tags) && e.tags.includes(tag));
}
export const LOADING_MESSAGES = [
'Consulting the caddie…',
'Checking the rulebook…',
'One moment…',
'Preparing your excuse…',
'Almost there…',
'Drawing a new card…',
];
export function getDailyExcuse(excuses) {
const today = new Date().toISOString().slice(0, 10);
let hash = 0;
for (let i = 0; i < today.length; i++) {
hash = ((hash << 5) - hash) + today.charCodeAt(i);
hash |= 0;
}
return excuses[Math.abs(hash) % excuses.length];
}