/src/IA.h
C Header | 58 lines | 52 code | 6 blank | 0 comment | 0 complexity | 08d76fb8485fe20c712532954027ebb1 MD5 | raw file
1#ifndef __IA_H_INCLUDED__
2#define __IA_H_INCLUDED__
3
4#include <irrlicht.h>
5
6using namespace irr;
7using namespace core;
8using namespace scene;
9using namespace video;
10using namespace io;
11using namespace gui;
12using namespace std;
13
14#ifdef _IRR_WINDOWS_
15#pragma comment(lib, "Irrlicht.lib")
16#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
17#endif
18
19class IA{
20 public:
21 IA(short dificuldade);
22 void setDificuldade(short dificuldade);
23 void refreshExternalVariables(float velocidade_npc, float velocidade_player,vector3df posicao_npc,vector3df posicao_player, int colocacao_npc, int colocacao_player);
24 float getVelocidadeMin();
25 float getAceleracao();
26 bool shouldIrunFaster();
27 void setThinking(short number);
28 void resetStamina();
29 float getCurrentSpeed();
30
31 private:
32 bool isNPCBehindPL();
33 bool isNPCSpeedGood();
34 bool isNPCFarAwayFromPL();
35 bool isPLSpeedTooGood();
36 bool isMyPlaceGood();
37 bool isNPCMaxSpeed();
38 bool isMyStaminaGood();
39 float rand_FloatRange(float a, float b);
40 short dificuldade;
41 short thinking;
42 float velocidade_npc;
43 float velocidade_player;
44 float velocidade_max;
45 float forca_max;
46 float resistencia;
47 float velocidade_min;
48 int colocacao_npc;
49 int stamina;
50 int iteracao;
51 int colocacao_player;
52 vector3df posicao_npc;
53 vector3df posicao_npc2;
54 vector3df posicao_npc3;
55 vector3df posicao_player;
56};
57
58#endif