-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPredator.h
32 lines (27 loc) · 845 Bytes
/
Predator.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
/**
* @file Predator.h
* @brief Defines the Predator class, a type of Organism and a predator in the World grid.
*
* @class Predator
*
* @details Predator is a concrete implementation of the Organism class. It populates the World grid
* and follows a specific set of rules for movement, breeding, and starvation - reflecting its behavior as a predator.
*/
#include "Organism.h"
#include <vector>
class Predator : public Organism
{
public:
Predator();
Predator(World *world, int x, int y);
~Predator();
// Implementing Organism's pure virtual functions
virtual void breed() override;
virtual void move() override;
virtual int getType() override;
virtual bool starve() override;
// You can add more Predator-specific methods here if needed
protected:
// Predator-specific variables can go here, if any
int starveTicks;
};