Activating Moon Mode
Use the--moon flag to display a circular ASCII art moon instead of the animated joke:
How It Works
Moon mode generates ASCII art using mathematical circle rendering with the payload text centered inside.Circle Algorithm
The moon is drawn using a distance-based circle algorithm frommoon.py:25-31:
- For each character position
(x, y), calculate the distance from the center - Adjust for character aspect ratio (characters are taller than wide)
- If distance is within 0.5 units of the radius
R, draw a#symbol - This creates a circular outline
Character Aspect Ratio
Terminal characters are not square - they’re approximately twice as tall as they are wide. The algorithm compensates for this:CHAR_ASPECT to make the circle appear round instead of elliptical:
Moon Sizing
The moon automatically sizes itself to fit your terminal:- Radius is half the terminal height minus 1, capped at 10
- Width is calculated from radius × aspect ratio
- If the moon is too wide, it resizes based on terminal columns
- The final moon diameter is constrained to fit within your terminal
Crater Generation
Craters are randomly scattered inside the moon circle using a seeded random generator:Crater Placement Algorithm
Frommoon.py:41-53:
- Find all positions inside the circle (distance < R - 0.5) that are empty spaces
- For approximately 1/12th of those positions, place a crater
- Randomly select a crater type from
CRATERS - Place it at a random empty position
- Multi-character craters like
()span multiple positions
Crater Types
Six crater patterns are available:()- Large crater (2 characters)o- Medium crater.- Small crater (appears twice for higher frequency)
Center Payload
The text “Bofa deez nuts” is always centered in the middle row of the moon:y == 0, which is the vertical center of the moon. The text is positioned so it’s horizontally centered within the moon’s width.
Deterministic Output
The moon always looks the same for a given terminal size because the random number generator is seeded with This ensures consistent, reproducible ASCII art across multiple runs.
42:Example Output Structure
#characters form the outer circle edge.,o,()are randomly placed craters- Center row contains the payload text
- Trailing spaces are trimmed from each line
Moon vs Regular Mode
The--moon argument is checked early in the main function:
- No animations or effects
- Instant output
- Static ASCII art
- Always uses the same payload text
- No Unicode detection (works in all terminals)
- Multiple animated effects
- Random effect selection
- Unicode support detection
- Terminal compatibility checks
- Keyboard interrupt handling