-
Notifications
You must be signed in to change notification settings - Fork 0
/
Player.h
56 lines (54 loc) · 1.24 KB
/
Player.h
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
#pragma once
#include "Bullet.h"
#include <stdlib.h>
#include "Granade.h"
#include <math.h>
#include "GLUT.h"
const int NUM_ROOMS = 20;
class Player
{
public:
Player();
Player(int id, Point2D* point);
~Player();
bool checkIfHit(Bullet* bt);
int decideNextMove();
double calcX();
double calcY();
int getHp();
void setHp(int hp);
Bullet* shoot(double angle, Node(&maze)[MSZ][MSZ]);
Granade* throwGranade(double angle, Node(&maze)[MSZ][MSZ]);
void shootSimulation(Node(&maze)[MSZ][MSZ]);
void throwGranadeSimulation(Node(&maze)[MSZ][MSZ]);
int getBelongsToTeam();
void setBelongsToTeam(int teamNumber);
Point2D* getPoint();
void setPoint(Point2D* point);
int getMode();
void setMode(int mode);
double getAngle(Player* opposingPlayer);
double getAngleToNode(Node* node);
int getRoom();
void setRoom(int room);
void showPlayer();
void printRowAndCol();
void reload();
int getId();
void setId(int id);
int getNumOFGranades();
void addToVisited(int roomNum);
bool isVisitedTheRoom(int roomNum);
bool allVisited();
void resetVisited();
private:
int id;
int belongsToTeam;
int room;
Point2D* point;
int hp;
int ammo;
int numOfGranades;
int mode;
bool roomsVisited[NUM_ROOMS];
};