-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.h
More file actions
79 lines (50 loc) · 1.33 KB
/
game.h
File metadata and controls
79 lines (50 loc) · 1.33 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
// Created by Aref on 19/06/30.
//
#ifndef GAME_CONSOLE_GAME_H
#define GAME_CONSOLE_GAME_H
#include "rule.h"
#include "map.h"
#include "objects.h"
#include "vector.h"
typedef struct Game Game;
struct Game {
Rule *rule;
Map *map;
Vector *solidBlocks;
Vector *deathBlocks;
Vector *raindbs;
Vector *move_blocks;
Vector *walls;
Vector *rpoints;
Vector *opps;
Object player;
Object target;
Object object;
Time time;
int score;
int game_over;
int attack;
};
void init_game(Game *game, char *game_name);
void init_game_with_map(Game *game);
void next_frame(Game *game);
void opps_move(Game *game);
void raindbs_move(Game *game);
void make_raindb(Game *game);
void move_another(Object *obj, Game *game);
void move_object(Object *obj, Game *game);
void choose_dir(Object *opp, Point target, Game *game);
void change_map(Game *game);
void set_vector_on_map(Vector *objs, Map *map);
void set_obj_on_map(Object *objs, Map *map);
void end_game(Game *game);
void drop(Game *game);
void set_rpoints(Game* game);
void check_game_over_end(Game* game);
Point get_dir(char point, Map* map);
void opps_decision(Game *game, Object* opp);
void best_move(Game *game, Object* opp, Point dir, Map* map);
void clean_nulls(Game* game);
void player_attack(Game* game);
#endif //GAME_CONSOLE_GAME_H