back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/pac.h
blob: dfa6a86a5e5c01fa9a8537f8aeb1f70bfcd20242 (plain)
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
#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 coins_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);
struct queue;
void make_pac_move(game_space field, struct pacman *pac,
                   struct queue *eaten_coins);

#endif