aboutsummaryrefslogtreecommitdiff
path: root/petratc.c
diff options
context:
space:
mode:
authordavid <[email protected]>2026-07-18 22:31:52 -0300
committerdavid <[email protected]>2026-07-18 22:31:52 -0300
commit60894c955ef1d53f39c541194c48a8258514e7df (patch)
treeb32b03a99f591152cf208b2f2a486baac9e3c9e7 /petratc.c
parent9eed029cfca51223d8291fbb408804bb2d357dca (diff)
downloadpetratc-60894c955ef1d53f39c541194c48a8258514e7df.tar.gz
petratc-60894c955ef1d53f39c541194c48a8258514e7df.zip
i should commit every time i do something new instead of whenever i feel like
Diffstat (limited to 'petratc.c')
-rw-r--r--petratc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/petratc.c b/petratc.c
index ac40791..440505b 100644
--- a/petratc.c
+++ b/petratc.c
@@ -5,7 +5,6 @@
#include <string.h>
#include <sys/stat.h>
#include "rat.h"
-#include "defs.h"
#ifdef __APPLE__
#define ratpath "%s/Library/Application Support/rat"
@@ -33,6 +32,12 @@
"SQUEAAAKKKKK",
};
+ char *funfact[] = {
+ "press q to exit games !",
+ "rats love cheese!",
+ "i am sleepy.."
+ };
+
void addstat(float *guy){
if(*guy < 98.5){
@@ -117,6 +122,7 @@ void printrat(WINDOW *win){
row++;
int howmany = sizeof(messages) / sizeof(messages[0]);
+ int facts = sizeof(funfact) / sizeof(funfact[0]);
mvwprintw(win, row++, 2, "%s", messages[rand() % howmany]);
row++;
@@ -133,6 +139,7 @@ void printrat(WINDOW *win){
mvwprintw(win, row++, 2, "5: clicker the cheese! (all up)");
mvwprintw(win, row++, 2, "9: print me! (refreshes stats)");
mvwprintw(win, row++, 2, "0: exit...");
+ mvwprintw(win, row++ +1, 1, "fun fact: %s", funfact[rand() % facts]);
wrefresh(win);
}