Mayweather vs McGregor: Prepare the cash prize
Jelly, 92 75 bytes
⁽©Ḍṃ“_= ”x"“€Þ‘x2,6¤;"⁾_|x1,7¤z⁶ZUŒBY”$“¢=Ḷ't3y&ḅḄȥıḍḄḌṀṡḂẓPḣṁQṘ½ɗ’BT+134¤¦
Try it online!
How?
Step 1. Build a list of the rows of the right half of an empty briefcase, ignoring trailing spaces:
⁽©Ḍṃ“_= ”x"“€Þ‘x2,6¤;"⁾_|x1,7¤
“_= ” - literal list of characters = "_= "
⁽©Ḍ - base 250 literal = 2674
ṃ - base decompress (2674 in base: 1='_', 2='=', 0=' ')
- ...yields the list of characters: "_ = _"
¤ - nilad followed by link(s) as a nilad:
“€Þ‘ - literal list of code page indexes = [12,20]
2,6 - literal list of numbers = [2,6]
x - repeat -> [12,12,20,20,20,20,20,20]
x - repeat -> ["_"*12, " "*12, "="*20, " "*20, ..., "_"*20]
¤ - nilad followed by link(s) as a nilad:
⁾_| - literal list of characters = "_|"
1,7 - literal list of numbers = [1,7]
x - repeat -> list of characters "_|||||||"
" - zip with the dyad:
; - concatenate -> ["_"+"_"*12, "|"+" "*12, ...]
Step 2: transform that into a whole empty briefcase:
z⁶ZUŒBY
⁶ - literal space character
z - transpose with filler (adds the "leading" spaces, to the 1st 2 rows)
Z - transpose (back from columns to rows again)
U - upend (reverse each row to make it a left-hand side of an empty briefcase)
ŒB - bounce (add a reflection of each row with one central character)
Y - join with new lines
Step 3: Show me the money!
”$“¢=Ḷ't3y&ḅḄȥıḍḄḌṀṡḂẓPḣṁQṘ½ɗ’BT+134¤¦
¦ - sparse application of:
”$ - literal '$' character
- ...to indexes:
¤ - nilad followed by link(s) as a nilad:
“¢=Ḷ't3y&ḅḄȥıḍḄḌṀṡḂẓPḣṁQṘ½ɗ’ - base 250 literal = 1999171130867115278012045759181600763304793110829063794065408
B - convert to a binary list -> [1,0,0,1,1,1,1,1,0,0,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,1,0,0,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
T - truthy indexes -> [1,4,5,6,7,8,11,12,13,14,15,18,26,39,43,46,50,53,57,60,61,62,66,67,68,85,88,92,95,99,102,105,106,107,110,127,130,131,132,133,134,137,138,139,140,141,144,152]
134 - literal 134
+ - addition -> [135,138,139,140,141,142,145,146,147,148,149,152,160,173,177,180,184,187,191,194,195,196,200,201,202,219,222,226,229,233,236,239,240,241,244,261,264,265,266,267,268,271,272,273,274,275,278,286]
- (that's where the $s at!)
JavaScript (ES6), 187 184 bytes
_=>`70
78B
B2B
9F33CDB
AEFEFEF54B
9FEFEFF6DB
9F33CDB
B1B`.replace(/./g,c=>'__=$$$$ ||||$$$$'[n=+('0x'+c)].repeat(n>6?1:n?+'0005333'[n]||39:25)+' '.repeat(n-8?'0002632707307632'[n]:23))
How?
The output is built using these 16 unique patterns:
ID | Character | Repeated | Following spaces | Rendering
---+-----------+----------+------------------+-------------------------------------------
0 | _ | 25 | 0 | "_________________________"
1 | _ | 39 | 0 | "_______________________________________"
2 | = | 39 | 0 | "======================================="
3 | $ | 5 | 2 | "$$$$$ "
4 | $ | 3 | 6 | "$$$ "
5 | $ | 3 | 3 | "$$$ "
6 | $ | 3 | 2 | "$$$ "
7 | space | 1 | 7 | " "
8 | | | 1 | 23 | "| "
9 | | | 1 | 7 | "| "
A | | | 1 | 3 | "| "
B | | | 1 | 0 | "|"
C | $ | 1 | 7 | "$ "
D | $ | 1 | 6 | "$ "
E | $ | 1 | 3 | "$ "
F | $ | 1 | 2 | "$ "
Demo
let f =
_=>`70
78B
B2B
9F33CDB
AEFEFEF54B
9FEFEFF6DB
9F33CDB
B1B`.replace(/./g,c=>'__=$$$$ ||||$$$$'[n=+('0x'+c)].repeat(n>6?1:n?+'0005333'[n]||39:25)+' '.repeat(n-8?'0002632707307632'[n]:23))
console.log(f())
05AB1E, 80 bytes
•Cā½œSÖ<ô’=-¾Ì„*нcF/“è∊αΔú9d:î₅•6B5¡.B€û»•H0αű¼Āß8PβÁ19]×
ôв•bvðy.;}4ÝJ"$ |=_"‡
Try it online!
Explanation
The basic outline of the briefcase:
05AB1E, 41 bytes
•Cā½œSÖ<ô’=-¾Ì„*нcF/“è∊αΔú9d:î₅•6B5¡.B€û»
Try it online!
Sub-explanation explanation (part one):
I converted the overall design by cutting the design in half, replacing all characters with 2-6 and finally converting it to base 255 and reconstructing the shape using 5
as a newline delimiter.
•Cā½œSÖ<ô’=-¾Ì„*нcF/“è∊αΔú9d:î₅• # Push the base-255 compressed number
6B # Convert it to base-6 (the number of unique symbols)
5¡ # Split on 5 (the newlines).
.B # Pad all elements with space to equal largest element length.
€û # For each element, mirror it.
» # Separate list with newlines.
77793946998265282127108152676813925695887415511783202442861719287811277
Is the number that's expressed in base 255, and the base 6 conversion of it is...
11111111444444444444511111111211111111111523333333333333333333525252525244444444444444444445
Then, splitting that on fives, mirroring and joining by newlines gets us...
111111114444444444444444444444411111111
111111112111111111111111111111211111111
233333333333333333333333333333333333332
2 2
2 2
2 2
2 2
244444444444444444444444444444444444442
Sub-explanation explanation (part two):
Starting to see where this is going? Next, I compress the inner pattern as a base-255 string:
•H0αű¼Āß8PβÁ19]×
ôв•
Which is:
353343914082943027578174279006736773101445087
Convert to binary:
1111110110000011000001101111111011111110111011011101101110110001110001111111111101101110110111011011000110111111111110110000011000001101111111011111
For each of those characters, replace a space with the next character, iteratively:
111111114444444444444444444444411111111
111111112111111111111111111111211111111
233333333333333333333333333333333333332
211111101100000110000011011111110111112
211011101101110110111011000111000111112
211111101101110110111011011000110111112
211111101100000110000011011111110111112
244444444444444444444444444444444444442
Finally, replace the characters with what they're supposed to be.
0 = '$'
1 = ' '
2 = '|'
3 = '='
4 = '_'
4ÝJ"$ |=_"‡
For the loss:
_______________________
| |
|=====================================|
| $ $$$$$ $$$$$ $ $ |
| $ $ $ $ $ $ $$$ $$$ |
| $ $ $ $ $ $ $$$ $ |
| $ $$$$$ $$$$$ $ $ |
|_____________________________________|
By compressing it as two separate patterns I save 20 bytes over:
7ºnF@É₄S¡‘nz'W›мλнbнžSÍõ₄óð½²Ç0Δεenë3aŽÖk∍&1ŒâÜ[¤öüuиSð±zαÛʸq¥KÃĀ›Ć^ü¹ÉRKq®Ùì=Ö‚≠ØÖì¾!(Δ∍Ú
Which is:
111111114444444444444444444444411111111
111111112111111111111111111111211111111
233333333333333333333333333333333333332
211111101100000110000011011111110111112
211011101101110110111011000111000111112
211111101101110110111011011000110111112
211111101100000110000011011111110111112
244444444444444444444444444444444444442
Converted to base-10:
29962958783786255124710309272045448655717311098547870227488323781868803792449842685227629539722703574931794395923080776255103394202825327279714682601797290475465885089686540986020693577678744259173981845378875732421872
92 bytes plus the transliteration, which would total to about 105.