-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParticipant.h
More file actions
30 lines (27 loc) · 884 Bytes
/
Participant.h
File metadata and controls
30 lines (27 loc) · 884 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 PARTICIPANT_H
#define PARTICIPANT_H
#include "defs.h"
#include "MoveBehaviour.h" // Include the move behaviour header file
class Participant {
public:
Participant() = default; // Default constructor
Participant(char avatar, int row, int col, MoveBehaviour* behaviour); // Add MoveBehaviour* parameter to constructor
virtual ~Participant();
void move();
virtual void incurDamage(Participant* p) = 0;
virtual int causeDamage() const = 0;
virtual bool isSafe() const = 0;
bool collide(Participant* p) const;
char getAvatar() const;
bool isDead() const;
int getRow() const;
int getCol() const;
void setMoveBehaviour(MoveBehaviour* behaviour); // Add setter for move behaviour
protected:
char avatar;
bool dead;
int row;
int column;
MoveBehaviour* moveBehaviour; // Add member for move behaviour
};
#endif