IA presque fonctionnelle

This commit is contained in:
Unknown 2018-06-23 17:24:23 +02:00
parent 852ed855fc
commit 14850bd05f
2 changed files with 603 additions and 521 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +1,35 @@
#ifndef IAENGINE_H_
#define IAENGINE_H_
typedef struct noeud
{
int compteur, min, cout_f; //
int ParentX;
int ParentY;
// 'adresse' du parent (qui sera toujours dans la map fermée)
}NOEUD;
int FindShortestPath(int Player1PositionX, int Player1PositionY, int Player2PositionX, int Player2PositionY);
//int IAEngine(PLAYER * player1, PLAYER * player2);
int IAEngine(ARENA_H_TILE* arena,PLAYER * player1, PLAYER * player2);
int distance(int x1, int y1, int x2, int y2);
//int CalculatePath(ARENA_H_TILE* arena,int PositionX, int PositionY,PLAYER * player1, int compteur, int distance,int min);
//int CalculatePath(ARENA_H_TILE* arena,int posX, int posY,NOEUD * n1,PLAYER * player1, int compteur, int dist,int min);
NOEUD * CalculatePath(ARENA_H_TILE* arena,int posX, int posY,NOEUD * n1,PLAYER * player1,PLAYER * player2, int compteur, int dist,int min);
//NOEUD * CalculatePath(ARENA_H_TILE* arena,int posX, int posY,NOEUD * n1,PLAYER * player1, int compteur, int dist,int min);
#endif /* IAENGINE_H_ */
/*
* IAEngine.h
*
* Created on: 17 juin 2018
* Author: isen
*/
#ifndef IAENGINE_H_
#define IAENGINE_H_
typedef struct noeud
{
int compteur, min, cout_f; //
int ParentX;
int ParentY;
int actualX;
int actualY;
// 'adresse' du parent (qui sera toujours dans la map fermée)
}NOEUD;
int FindShortestPath(int Player1PositionX, int Player1PositionY, int Player2PositionX, int Player2PositionY);
//int IAEngine(PLAYER * player1, PLAYER * player2);
int IAEngine(ARENA_H_TILE* arena,PLAYER * player1, PLAYER * player2);
int distance(int x1, int y1, int x2, int y2);
//int CalculatePath(ARENA_H_TILE* arena,int PositionX, int PositionY,PLAYER * player1, int compteur, int distance,int min);
//int CalculatePath(ARENA_H_TILE* arena,int posX, int posY,NOEUD * n1,PLAYER * player1, int compteur, int dist,int min);
NOEUD * CalculatePath(ARENA_H_TILE* arena,NOEUD * n1,PLAYER * player1,PLAYER * player2, int compteur, int dist,int min);
//NOEUD * CalculatePath(ARENA_H_TILE* arena,int posX, int posY,NOEUD * n1,PLAYER * player1,PLAYER * player2, int compteur, int dist,int min);
//NOEUD * CalculatePath(ARENA_H_TILE* arena,int posX, int posY,NOEUD * n1,PLAYER * player1, int compteur, int dist,int min);
#endif /* IAENGINE_H_ */