Add magic 8ball app
Adds an app emulating a magic 8 ball. Who needs AI when you can get an answer to any* question this easily? * As long as it's a yes/no question.
Features
- Answers yes/no questions
- Has some maybe funny answers
- Has multiple answer pools
- Pretty versatile internal structure for adding your own answers
Images
Usage
Ask your yes/no question and shake the watch (or double tap) to get an answer.
Long tapping brings up a menu which allows you to choose the answer pool. They are as follows:
- Default: Has approx. 2:1 chance of showing one of the answers I wrote versus an original 8ball answer. Has a rare chance to show a nonsense silly answer.
- OG: Just the 20 original 8ball answers.
- Fair: Has an equal chance to give a yes or a no answer (default and OG have a 2:1 ratio of yes:no answers). Has a rare chance to show a nonsense silly answer.
- Rig - Yes: Same as Default, but no answers are replaced with yes and has no silly answers.
- Rig - No: Same as Default, but yes answers are replaced with no and has no silly answers.
- Cat: I blame my brother.
Development
To add your own answers, add them to the relevant vector in the categories variable in Magic8ball.h. Don't worry about affecting chances by adding more, the number of answers in a category doesn't affect its weight. That's managed by answerPools further down.
To add your own category, you need to add a new value to enum CategoryType, a new entry in the categories map (must have at least 1 answer associated with it (note the text sizing guide above categories)), and add this CategoryType to the relevant pools in answerPools. You may also add new entries to answerPools, they'll automatically show up in the long tap menu.
References
The original 8ball answers were pulled from https://magic-8ball.com/magic-8-ball-answers/.
Build size and comparison to main:
| Section | Size | Difference |
|---|---|---|
| text | 387232B | 8028B |
| data | 944B | 0B |
| bss | 22536B | 0B |
Turns out CLion formatter and ClangFormat have very slightly different opinions on things. Formatting is fixed now
Love this! 🤣