-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextras.c
More file actions
46 lines (42 loc) · 1.62 KB
/
extras.c
File metadata and controls
46 lines (42 loc) · 1.62 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
// Extras module for Calculator OS
// I Ching, Asciimojis, and Lasagna
#include "extras.h"
void show_iching(void) {
const char* hexagrams[] = {
"== == Heaven - Great success awaits",
"== Earth - Be receptive and patient",
"= = = Water - Danger, but persevere",
"===== Fire - Clarity and awareness",
"= === Thunder - Shock brings renewal",
"=== = Wind - Gentle persistence wins",
"== == Mountain - Keep still, meditate",
"= = == Lake - Joy through sharing"
};
int idx = simple_rand() % 8;
print_line(hexagrams[idx], YELLOW_ON_BLACK);
}
void show_asciimoji(void) {
const char* mojis[] = {
"(^_^) - Happy!",
"(T_T) - Sad...",
"(o_O) - Surprised!",
"(*_*) - Amazed!",
"(>_<) - Frustrated!",
"(@_@) - Dizzy!",
"(^o^) - Excited!",
"(-_-) - Sleepy..."
};
int idx = simple_rand() % 8;
print_line(mojis[idx], GREEN_ON_BLACK);
}
void show_lasagna(void) {
print_line(" ~~~~~~~~~~~~~~~~~~~~", YELLOW_ON_BLACK);
print_line(" / \\", YELLOW_ON_BLACK);
print_line(" | ==================== | <- cheese", YELLOW_ON_BLACK);
print_line(" | -------------------- | <- meat", YELLOW_ON_BLACK);
print_line(" | ==================== | <- pasta", YELLOW_ON_BLACK);
print_line(" | -------------------- | <- sauce", YELLOW_ON_BLACK);
print_line(" | ==================== | <- more cheese!", YELLOW_ON_BLACK);
print_line(" \\____________________/", YELLOW_ON_BLACK);
print_line(" LASAGNA TIME!", GREEN_ON_BLACK);
}