From 893720c794c0b9cd8faf3e7e67b672e00b7b1ce1 Mon Sep 17 00:00:00 2001 From: Ivan Davydov Date: Sat, 5 Apr 2025 19:42:08 +0300 Subject: Add clicker-ncurses.h --- a.out | Bin 16328 -> 16328 bytes clicker-ncurses.c | 18 ++++-------------- clicker-ncurses.h | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 clicker-ncurses.h diff --git a/a.out b/a.out index 038790f..a0d5407 100755 Binary files a/a.out and b/a.out differ diff --git a/clicker-ncurses.c b/clicker-ncurses.c index fbcc076..37dc0b9 100644 --- a/clicker-ncurses.c +++ b/clicker-ncurses.c @@ -1,20 +1,10 @@ #include #include #include -#include -struct game -{ - int click; - int multiplifier; - int score; -}; +#include -int get_score (struct game *game); -void *set_score (struct game *game, int score); -int get_click (struct game *game); -void *set_click (struct game *game, int click); -int get_multiplifier (struct game *game); +#include "clicker-ncurses.h" int main (void) @@ -85,7 +75,7 @@ get_score (struct game *game) return game->score; } -void * +void set_score (struct game *game, int score) { game->score = score; @@ -98,7 +88,7 @@ get_click (struct game *game) return game->click; } -void * +void set_click (struct game *game, int click) { game->click = click; diff --git a/clicker-ncurses.h b/clicker-ncurses.h new file mode 100644 index 0000000..b7c97c2 --- /dev/null +++ b/clicker-ncurses.h @@ -0,0 +1,14 @@ +struct game +{ + int click; + int multiplifier; + int score; +}; + +int get_score (struct game *game); +void set_score (struct game *game, int score); + +int get_click (struct game *game); +void set_click (struct game *game, int click); + +int get_multiplifier (struct game *game); -- cgit v1.2.3