-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathAnimal.h
More file actions
31 lines (24 loc) · 732 Bytes
/
Animal.h
File metadata and controls
31 lines (24 loc) · 732 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
31
#ifndef ANIMAL_H
#define ANIMAL_H
#include "Creature.h"
// Animals can walk and talk.
// They have brains, but they have no idea how to use it.
// You may teach them.
// Notice that an animal also has no idea how to get a face.
// More than that, as an animal, it does not care about faces at all.
class Forest;
class Animal : public Creature
{
public:
Animal();
Animal(double m, double b);
Animal(double m, double b, int _x, int _y);
~Animal();
virtual void set_brain(double b) final {brain = b;}
virtual double get_brain() final {return brain;}
virtual void walk(Forest* f);
virtual void talk() {}
private:
double brain;
};
#endif // ANIMAL_H