/[hs]/Reptiles/animal.h
ViewVC logotype

Contents of /Reptiles/animal.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Fri Mar 28 18:02:13 2003 UTC (16 years, 5 months ago) by jeremyd
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
File MIME type: text/plain
Seems to sorta work

1 jeremyd 1.1 #ifndef ANIMAL_H
2     #define ANIMAL_H
3    
4 jeremyd 1.3 #include "rando.h"
5 jeremyd 1.1 #include "position.h"
6    
7     class Animal {
8     public:
9 jeremyd 1.5 Animal();
10     Animal(int x, int y);
11 jeremyd 1.1 virtual void Live();
12     virtual void Age();
13     virtual void Die();
14 jeremyd 1.3 virtual void Move();
15 jeremyd 1.6 virtual Position2d *GetPosition();
16 jeremyd 1.1
17 jeremyd 1.2 //Must be implemented by derived classes --
18     virtual void Eat() = 0;
19    
20 jeremyd 1.1 protected:
21 jeremyd 1.2 int m_nAge, nTurnsOhneEssen;
22 jeremyd 1.1 Position2d myPos;
23 jeremyd 1.3 RandGen rando;
24 jeremyd 1.1 };
25    
26     #endif

cvs@jdrake.com
ViewVC Help
Powered by ViewVC 1.1.13