back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/pac.h
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-04-02 17:43:35 +0300
committerscratko <m@scratko.xyz>2024-04-02 17:43:35 +0300
commitbdee2852c13f6b02ec5207ded584839a3118233e (patch)
tree39f1c14be91fb848ce0f94a64532e48a7667e5de /pac.h
downloadpacman-bdee2852c13f6b02ec5207ded584839a3118233e.tar.gz
pacman-bdee2852c13f6b02ec5207ded584839a3118233e.tar.bz2
pacman-bdee2852c13f6b02ec5207ded584839a3118233e.zip
Initial commit
Diffstat (limited to 'pac.h')
-rw-r--r--pac.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/pac.h b/pac.h
new file mode 100644
index 0000000..1125694
--- /dev/null
+++ b/pac.h
@@ -0,0 +1,29 @@
+#ifndef PAC_H_SENTRY
+#define PAC_H_SENTRY
+
+#include "ghosts.h"
+
+enum {
+ max_live = 3,
+ pac_y = 22,
+ pac_x = 14
+};
+
+struct pacman {
+ char lives;
+ unsigned char points_eaten;
+ struct coordinates position;
+ enum movement_direction direction;
+};
+
+void initialize_pac(struct pacman *pac);
+
+void change_pac_direction(game_space field, struct pacman *pac, int key,
+ enum movement_direction *stored_direction);
+
+void check_remaining_direction(game_space field, struct pacman *pac,
+ enum movement_direction *stored_direction);
+
+void make_pac_move(game_space field, struct pacman *pac);
+
+#endif