-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnakeBot.h
More file actions
30 lines (19 loc) · 714 Bytes
/
snakeBot.h
File metadata and controls
30 lines (19 loc) · 714 Bytes
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 BOT_H
#define BOT_H
#include "main.h"
#define MAX_SIZE_FIFO WIDTH*HEIGHT // Définir la taille maximale de la pile FIFO
typedef struct AStarNode{
coordinate coord;
int f; // Coût total estimé (g + h)
int g; // Coût réel depuis le début
int h; // Coût estimé jusqu'à la cible
struct AStarNode* parent;
} AStarNode;
int manhattanDistance(coordinate c1, coordinate c2);
int sameCoordinate(coordinate c1, coordinate c2);
enum Direction performAStarSearch(Snake jeu);
enum Direction giveDirection(Snake jeu);
int indexMax(int tab[]);
int areaSize(coordinate coord, char board[HEIGHT][WIDTH]);
int isCoordinateInArray(coordinate data[], int size, coordinate target);
#endif