Goose Management Model ODdox  1.02
Hunters_all.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************************************
3 Copyright (c) 2013, Christopher John Topping, University of Aarhus
4 All rights reserved.
5 
6 Redistribution and use in source and binary forms, with or without modification, are permitted provided
7 that the following conditions are met:
8 
9 Redistributions of source code must retain the above copyright notice, this list of conditions and the
10 following disclaimer.
11 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
12 the following disclaimer in the documentation and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
15 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
17 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
18 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
19 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 ********************************************************************************************************
23 */
32 //---------------------------------------------------------------------------
33 #ifndef HuntersH
34 #define HuntersH
35 //---------------------------------------------------------------------------
36 class Hunter;
38 class Field;
39 
40 //------------------------------------------------------------------------------
41 
45 typedef enum
46 {
50 
56 {
62 };
63 
69 {
70  hlm_shoot = 0,
73 } ;
74 
80 {
81  public:
82  int m_ref;
83  int m_HType;
84  APoint m_home;
85  vector <int> m_huntlocrefs;
86  vector <APoint> m_huntlocs;
87  unsigned m_no_hunt_locs;
88  APoint m_validxy;
89  vector<Farm*> m_farms;
91  int m_weekend;
92  double m_efficiency;
96 };
97 
98 
103 {
106 };
107 
111 typedef vector < Hunter* > HunterList;
112 
120 class Hunter : public TAnimal
121 {
122 protected:
123  // Attributes
125  int m_myname;
131  int m_clock;
133  int m_bag;
147  double m_efficiency;
153  vector<Farm*> m_OurFarmers;
155  APoint m_Home;
161  vector <int> m_HuntLocRefs;
163  vector <APoint> m_HuntLocs;
164 
165  // Methods
167  virtual TypeOfHunterState st_ShouldGoHunting( void );
169  TypeOfHunterState st_OutHunting( void ); // Must be overridden in descendent classes;
173  virtual void Init(struct_Hunter* p_data);
175  bool IsTodayAPreferredHuntDay( int a_today );
177  bool IsTodayAChosenHuntDay( int a_today );
179  virtual int CheckForGame( void ) {
180  return false;
181  }
182 
183 public:
187  virtual ~Hunter();
190  return m_huntingdays;
191  }
193  int GetBag() {
194  return m_bag;
195  }
197  int GetShots() {
198  return m_myShots;
199  }
201  virtual void ResetBag() {
202  m_bag = 0;
203  m_myShots = 0;
204  }
207  m_huntingdays = 0;
208  }
210  int GetClock() {
211  return m_clock;
212  }
214  void ResetClock() {
215  m_clock = 0;
216  }
219  ResetBag();
221  }
223  bool IsOutHunting() {
224  if (m_CurrentHState == tohts_OutHunting) return true;
225  return false;
226  }
230  int GetRef() { return m_myname; }
232  APoint GetHome() { return m_Home; }
234  int GetHuntField() {
235  return m_huntfield_polyref;
236  }
238  APoint GetHuntLoc(unsigned a_ref) { return m_HuntLocs[a_ref]; }
240  Farm* GetFarmerRef(unsigned a_ref) { return m_OurFarmers[a_ref]; }
242  virtual bool InSeason( int /* day */ ) {
243  return false;
244  }
246  virtual bool IsSeasonEnd( int /* day */ ) {
247  return true;
248  }
250  virtual int GetSeasonLengthLeft( int /* day */ ) {
251  return 0;
252  }
254  virtual void SaveMyData( ofstream* /* a_ofile */ ) {
255  ; // Base class does nothing
256  }
258  virtual void OnShoot() { ; }
260  virtual void OnGoHome(){ ; }
261 
262 };
263 
268 class GooseHunter : public Hunter
269 {
270 protected:
271 // Attributes
277  bool m_dugin;
285  bool m_leader;
286 // Methods
288  virtual void Init();
290  virtual bool InSeason( int day );
292  virtual bool IsSeasonEnd( int day );
294  virtual int GetSeasonLengthLeft( int day );
300  bool FindHuntingLocation( void );
302  virtual int CheckForGame( void );
304  virtual void OnShoot();
306  virtual void OnGoHome();
307 public:
308 // Methods
312  virtual ~GooseHunter();
314  virtual void Step();
316  void OnShotABird( int a_birdtype, int a_poly );
318  virtual void SaveMyData( ofstream* a_ofile );
320  virtual void ResetBag() {
322  for (int i = 0; i < gst_foobar; i++) m_goosebag[ i ] = 0;
323  }
325  bool IsLeader() {
326  return m_leader;
327  }
328 };
329 
335 {
336 public:
337  // Methods
341  virtual ~Hunter_Population_Manager (void);
343  void Init(void);
345  void DistributeHunters(void);
347  void DistributeHuntersByRules( vector<HunterInfo> *a_hunterlist, int a_no_hunters, int a_ruleset );
349  void RuleSet10Based( int a_no_hunters, vector<int>* a_farmsizes, vector<HunterInfo>* a_hunterlist, vector<APoint>* a_roostlocs, int a_ruleset );
351  void SaveDistributedHunters( vector<HunterInfo>* a_hunterlist, int a_no_hunters );
353  void SaveFarmHunters( vector<HunterInfo>* a_hunterlist, int a_no_hunters );
355  void CreateObjects(int ob_type, TAnimal*, struct_Hunter* data,int number);
357  void RecordHuntingSuccess(int poly,int birds, int a_hunter);
359  APoint GetHunterHome(int a_index, int a_list);
361  APoint GetHunterHuntLoc(int a_index, int a_list, unsigned a_ref);
363  unsigned GetNoHuntLocs();
365  bool CheckDensity(int a_ref, vector<int> *a_illegalfarms, vector<FarmOccupcancyData>* a_FarmOccupancy);
367  bool AddHunterHunting( int a_polyref, Hunter* a_hunter );
369  void HunterLeaderMessage(TypeOfHunterLeaderMessage a_signal, int a_polyref);
371  vector<HunterList*> m_ActiveHuntingLocationsHunters;
375  bool IsPolyrefOnActiveList( int a_polyref );
377  void SetHuntingSeason();
382 
383 protected:
384  // Attributes
386  unsigned m_daytime;
393 
394 
395  // Methods
396  virtual bool StepFinished() { return true; }
398  virtual void DoFirst();
400  virtual void DoBefore(){}
402  virtual void DoAfter(){}
404  virtual void DoLast(){}
405 };
406 
407 //---------------------------------------------------------------------------
408 #endif
GooseHunter::m_pinkfootbaglimit
int m_pinkfootbaglimit
Bag limit for pinkfoot.
Definition: Hunters_all.h:281
struct_Hunter::m_weekend
int m_weekend
Definition: Hunters_all.h:91
toh_foobar
Definition: Hunters_all.h:48
struct_Hunter::m_huntingdayslimit
int m_huntingdayslimit
Definition: Hunters_all.h:90
Hunter_Population_Manager::GetNoHuntLocs
unsigned GetNoHuntLocs()
Calculates the number of hunting locations based on a distribution.
Definition: Hunters_all.cpp:186
GooseHunter::m_preyPopulationManger
Goose_Population_Manager * m_preyPopulationManger
Pointer to our game population, the geese.
Definition: Hunters_all.h:273
Hunter::ResetBag
virtual void ResetBag()
Sets the annual hunting bag to zero.
Definition: Hunters_all.h:201
Hunter::IsOutHunting
bool IsOutHunting()
A debug function, but may be useful in other contexts. Returns true of currently out hunting.
Definition: Hunters_all.h:223
Hunter_Population_Manager::DoLast
virtual void DoLast()
Available for hunter management - not used currently.
Definition: Hunters_all.h:404
polylist
vector< unsigned > polylist
Definition: farm.h:207
Hunter_Population_Manager::SetHuntingSeason
void SetHuntingSeason()
This returns the number of geese which are legal quarry on the polygon the day before.
Definition: Hunters_all.cpp:1498
GooseHunter::OnShoot
virtual void OnShoot()
On shoot message handler.
Definition: Hunters_all.cpp:1419
GooseHunter::Init
virtual void Init()
Initiation of a specific goose hunter here.
Definition: Hunters_all.cpp:1212
Hunter_Population_Manager::DoAfter
virtual void DoAfter()
Available for hunter management - not used currently.
Definition: Hunters_all.h:402
GooseHunter::m_leader
bool m_leader
When hunting this indicates whether the hunter is a team leader.
Definition: Hunters_all.h:285
Hunter::m_baglimit
int m_baglimit
Annual self-imposed limit on number shot - unused at present.
Definition: Hunters_all.h:143
Hunter_Population_Manager::m_HuntingSeasonStart
int m_HuntingSeasonStart
Start of the overall hunting season.
Definition: Hunters_all.h:390
Hunter::m_weekend
int m_weekend
Code for weekly hunting activity.
Definition: Hunters_all.h:151
Hunter_Population_Manager
The class to handle all predator population related matters.
Definition: Hunters_all.h:334
GooseHunter::ResetBag
virtual void ResetBag()
Sets the annual hunting bag to zero.
Definition: Hunters_all.h:320
Hunter::IsTodayAPreferredHuntDay
bool IsTodayAPreferredHuntDay(int a_today)
Checks for the hunting day preference (weekday or any day)
Definition: Hunters_all.cpp:1137
Hunter::m_huntfield_polyref
int m_huntfield_polyref
The polygon reference number to our current hunting field (which is at a hunting location)
Definition: Hunters_all.h:157
Hunter_Population_Manager::DistributeHunters
void DistributeHunters(void)
Distributes hunters to hunting locations (farms).
Definition: Hunters_all.cpp:151
Hunter::IsSeasonEnd
virtual bool IsSeasonEnd(int)
Is it the end of the hunting season? - MUST be overridden in descendent class.
Definition: Hunters_all.h:246
GooseHunter::GooseHunter
GooseHunter(struct_Hunter *p_data, Hunter_Population_Manager *p_PPM)
GooseHunter constructor.
Definition: Hunters_all.cpp:1197
struct_Hunter::m_ref
int m_ref
Definition: Hunters_all.h:82
Hunter::GetHome
APoint GetHome()
Provide our home coords.
Definition: Hunters_all.h:232
GooseHunter::IsLeader
bool IsLeader()
Returns the leader flag.
Definition: Hunters_all.h:325
struct_Hunter::m_farms
vector< Farm * > m_farms
Definition: Hunters_all.h:89
struct_Hunter::m_no_hunt_locs
unsigned m_no_hunt_locs
Definition: Hunters_all.h:87
struct_Hunter::m_preyPM
Population_Manager * m_preyPM
Definition: Hunters_all.h:95
struct_Hunter::m_huntlocrefs
vector< int > m_huntlocrefs
Definition: Hunters_all.h:85
Hunter::st_OutHunting
TypeOfHunterState st_OutHunting(void)
The basic hunting behaviour.
Definition: Hunters_all.cpp:1177
GooseHunter::IsSeasonEnd
virtual bool IsSeasonEnd(int day)
Is it the end of the goose hunting season? - MUST be overridden in descendent class.
Definition: Hunters_all.cpp:1260
Hunter_Population_Manager::HunterLeaderMessage
void HunterLeaderMessage(TypeOfHunterLeaderMessage a_signal, int a_polyref)
A message system to rely messages from the leader hunter to others in his team.
Definition: Hunters_all.cpp:1027
Hunter::m_huntingdays
int m_huntingdays
The numbers of days used for hunting this year.
Definition: Hunters_all.h:139
Hunter::GetShots
int GetShots()
Gets the number of shots this season to-date.
Definition: Hunters_all.h:197
Hunter::m_lasthuntday
int m_lasthuntday
The date for the last hunt day.
Definition: Hunters_all.h:141
GooseHunter::m_dugin
bool m_dugin
Flag to show whether a hunting location has been found.
Definition: Hunters_all.h:277
Hunter::m_huntlimit
int m_huntlimit
Annual self-imposed limit on number of days spent hunting.
Definition: Hunters_all.h:145
Hunter::GetBag
int GetBag()
Gets the annual hunting bag.
Definition: Hunters_all.h:193
TypeOfHunterState
TypeOfHunterState
Hunters like other ALMaSS animals work using a state/transition concept. These are the hunter behavio...
Definition: Hunters_all.h:55
Hunter::st_ShouldGoHunting
virtual TypeOfHunterState st_ShouldGoHunting(void)
Decide whether to go out hunting on a specific day.
Definition: Hunters_all.cpp:1109
Hunter::m_OurFarmers
vector< Farm * > m_OurFarmers
List of pointers to the farmers whose land the hunter hunts
Definition: Hunters_all.h:153
Hunter::m_NoHuntLocs
int m_NoHuntLocs
Definition: Hunters_all.h:159
TypeOfHunterLeaderMessage
TypeOfHunterLeaderMessage
Types of message a hunter leader can pass on to team members.
Definition: Hunters_all.h:68
Hunter::Hunter
Hunter(struct_Hunter *p_data, Hunter_Population_Manager *p_PPM)
The constructor for the Hunter class.
Definition: Hunters_all.cpp:1075
GooseHunter::CheckForGame
virtual int CheckForGame(void)
If the hunter checks for game at their hunting locations then this is done here. Must be overridden.
Definition: Hunters_all.cpp:1231
Landscape
The landscape class containing all environmental and topographical data.
Definition: landscape.h:112
Hunter_Population_Manager::GetHunterHuntLoc
APoint GetHunterHuntLoc(int a_index, int a_list, unsigned a_ref)
Returns the hunter hunting location location.
Definition: Hunters_all.cpp:1021
Hunter::~Hunter
virtual ~Hunter()
The destructor for the Hunter class.
Definition: Hunters_all.cpp:1081
GooseHunter::SaveMyData
virtual void SaveMyData(ofstream *a_ofile)
Each hunter needs to save different kinds of data, so we use a polymorphic method for this.
Definition: Hunters_all.cpp:1469
hlm_shoot
Definition: Hunters_all.h:70
Hunter::OnGoHome
virtual void OnGoHome()
On gohome message handler - must be overidden in descendent classes.
Definition: Hunters_all.h:260
Hunter::GetRef
int GetRef()
Provide our ref name.
Definition: Hunters_all.h:230
Hunter_Population_Manager::~Hunter_Population_Manager
virtual ~Hunter_Population_Manager(void)
Hunter population manager destructor.
Definition: Hunters_all.cpp:141
Hunter_Population_Manager::CreateObjects
void CreateObjects(int ob_type, TAnimal *, struct_Hunter *data, int number)
Creates hunter objects and assigns them to the population manager lists.
Definition: Hunters_all.cpp:925
Hunter_Population_Manager::IsPolyrefOnActiveList
bool IsPolyrefOnActiveList(int a_polyref)
Debugging check method.
Definition: Hunters_all.cpp:1059
toh_GooseHunter
Definition: Hunters_all.h:47
GooseHunter::st_OutHunting
TypeOfHunterState st_OutHunting(void)
The basic hunting behaviour.
Definition: Hunters_all.cpp:1332
struct_Hunter::m_HType
int m_HType
Definition: Hunters_all.h:83
GooseHunter::GetSeasonLengthLeft
virtual int GetSeasonLengthLeft(int day)
Returns the length of the hunting season in days - MUST be overridden in descendent class.
Definition: Hunters_all.cpp:1296
struct_Hunter::m_validxy
APoint m_validxy
Definition: Hunters_all.h:88
Hunter::m_OurPopulationManager
Hunter_Population_Manager * m_OurPopulationManager
Pointer to the population manager.
Definition: Hunters_all.h:129
TAnimal
Hunter::m_HuntLocs
vector< APoint > m_HuntLocs
Definition: Hunters_all.h:163
GooseHunter::st_ShouldGoHunting
virtual TypeOfHunterState st_ShouldGoHunting(void)
Behavior involved in deciding whether to go hunting.
Definition: Hunters_all.cpp:1315
FarmOccupcancyData::m_FarmRef
int m_FarmRef
Definition: Hunters_all.h:104
Hunter_Population_Manager::Init
void Init(void)
Create the initial hunter population and initializes any output options.
Definition: Hunters_all.cpp:837
GooseHunter::m_huntfields
polylist * m_huntfields
Our list of possible hunting fields as polygon reference numbers as supplied by Landscape::SupplyPoly...
Definition: Hunters_all.h:275
Hunter::m_myMagazine
int m_myMagazine
The number of shells in the magazine.
Definition: Hunters_all.h:137
struct_Hunter::m_efficiency
double m_efficiency
Definition: Hunters_all.h:92
Hunter_Population_Manager::m_ActiveHuntingLocationsPolyrefs
vector< int > m_ActiveHuntingLocationsPolyrefs
Lists of polygon reference numbers for all active hunting locations (updated daily)
Definition: Hunters_all.h:373
Hunter::GetClock
int GetClock()
Supplies the clock time.
Definition: Hunters_all.h:210
Hunter::GetHuntField
int GetHuntField()
Get the polygon reference number to our current hunting field (which is at a hunting location)
Definition: Hunters_all.h:234
Hunter::GetHuntingDays
int GetHuntingDays()
Gets the annual hunting attempts count.
Definition: Hunters_all.h:189
Hunter_Population_Manager::SaveDistributedHunters
void SaveDistributedHunters(vector< HunterInfo > *a_hunterlist, int a_no_hunters)
Saves the results of the hunter distribution to an output file.
Definition: Hunters_all.cpp:198
Population_Manager
Hunter::m_myname
int m_myname
A reference number unique to this hunter.
Definition: Hunters_all.h:125
Hunter_Population_Manager::SaveFarmHunters
void SaveFarmHunters(vector< HunterInfo > *a_hunterlist, int a_no_hunters)
Saves the results of the hunter distribution to an output file by farm.
Definition: Hunters_all.cpp:233
struct_Hunter::m_home
APoint m_home
Definition: Hunters_all.h:84
gst_foobar
Definition: Goose_Base.h:66
Goose_Population_Manager
The class to handle all goose population related matters.
Definition: Goose_Population_Manager.h:392
Hunter::m_goosecountchance
double m_goosecountchance
Probability of checking for geese in hunting area.
Definition: Hunters_all.h:149
Hunter
The base class for hunters encompsassing all their general behaviours.
Definition: Hunters_all.h:120
GooseHunter::~GooseHunter
virtual ~GooseHunter()
GooseHunter destructor.
Definition: Hunters_all.cpp:1207
Field
Definition: elements.h:727
Hunter_Population_Manager::DoFirst
virtual void DoFirst()
Does general daily tasks e.g. reset time of day, reset bag lists if start of year etc....
Definition: Hunters_all.cpp:947
Hunter::OnShoot
virtual void OnShoot()
On shoot message handler - must be overidden in descendent classes.
Definition: Hunters_all.h:258
Hunter::OnMorning
void OnMorning()
Optimism in the morning, perhaps we should hunt?
Definition: Hunters_all.h:228
Hunter::GetFarmerRef
Farm * GetFarmerRef(unsigned a_ref)
Provide our ref name.
Definition: Hunters_all.h:240
Hunter::GetSeasonLengthLeft
virtual int GetSeasonLengthLeft(int)
Returns the length of the hunting season in days - MUST be overridden in descendent class.
Definition: Hunters_all.h:250
struct_Hunter::m_L
Landscape * m_L
Definition: Hunters_all.h:94
GooseHunter::m_goosebag
int m_goosebag[gst_foobar]
A special bag data structure so the hunter knows what kind of geese he shot.
Definition: Hunters_all.h:279
Hunter::m_myShots
int m_myShots
The numbers of shots to-date this year.
Definition: Hunters_all.h:135
struct_Hunter::m_huntlocs
vector< APoint > m_huntlocs
Definition: Hunters_all.h:86
GooseHunter::m_greylagbaglimit
int m_greylagbaglimit
Bag limit for greylag.
Definition: Hunters_all.h:283
GooseHunter::Step
virtual void Step()
GooseHunter Step code.
Definition: Hunters_all.cpp:1446
tohts_foobar
Definition: Hunters_all.h:61
FarmOccupcancyData
Definition: Hunters_all.h:102
HunterList
vector< Hunter * > HunterList
Definition: Hunters_all.h:111
GooseHunter::OnGoHome
virtual void OnGoHome()
On gohome message handler.
Definition: Hunters_all.cpp:1438
Hunter::m_HuntLocRefs
vector< int > m_HuntLocRefs
Definition: Hunters_all.h:161
hlm_gohome
Definition: Hunters_all.h:71
tohts_Resting
Definition: Hunters_all.h:60
Hunter_Population_Manager::m_daytime
unsigned m_daytime
Used to follow the time of day in 10 minute steps.
Definition: Hunters_all.h:386
FarmOccupcancyData::m_no_hunters
int m_no_hunters
Definition: Hunters_all.h:105
Hunter::m_CurrentHState
TypeOfHunterState m_CurrentHState
The current hunter behavioural state.
Definition: Hunters_all.h:127
Hunter_Population_Manager::RecordHuntingSuccess
void RecordHuntingSuccess(int poly, int birds, int a_hunter)
Hunting bag output.
Definition: Hunters_all.cpp:1002
Hunter_Population_Manager::GetHuntingSeasonEnd
int GetHuntingSeasonEnd()
Get the end of the overall hunting season.
Definition: Hunters_all.h:381
Hunter_Population_Manager::GetHuntingSeasonStart
int GetHuntingSeasonStart()
Get the start of the overall hunting season.
Definition: Hunters_all.h:379
struct_Hunter
Used for creation of a new hunter object.
Definition: Hunters_all.h:79
Hunter::IsTodayAChosenHuntDay
bool IsTodayAChosenHuntDay(int a_today)
Uses a probability test to determine whether to go hunting today.
Definition: Hunters_all.cpp:1158
Farm
The base class for all farm types.
Definition: farm.h:767
Hunter_Population_Manager::m_HuntingBagRecord
ofstream * m_HuntingBagRecord
Output file for hunting bag record.
Definition: Hunters_all.h:388
tohts_Hunting
Definition: Hunters_all.h:58
tohts_OutHunting
Definition: Hunters_all.h:59
Hunter_Population_Manager::GetHunterHome
APoint GetHunterHome(int a_index, int a_list)
Returns the hunter home location.
Definition: Hunters_all.cpp:1016
Hunter_Population_Manager::StepFinished
virtual bool StepFinished()
Definition: Hunters_all.h:396
Hunter_Population_Manager::RuleSet10Based
void RuleSet10Based(int a_no_hunters, vector< int > *a_farmsizes, vector< HunterInfo > *a_hunterlist, vector< APoint > *a_roostlocs, int a_ruleset)
Used to implement rule sets based on rule set 10.
Definition: Hunters_all.cpp:800
Hunter::ResetHuntingOpportunities
void ResetHuntingOpportunities()
Sets the annual hunting attempts count to zero.
Definition: Hunters_all.h:206
struct_Hunter::m_goosecountchance
double m_goosecountchance
Definition: Hunters_all.h:93
Hunter::ResetSeasonData
void ResetSeasonData()
Sets the bag and hunting counters to zero.
Definition: Hunters_all.h:218
Hunter_Population_Manager::Hunter_Population_Manager
Hunter_Population_Manager(Landscape *p_L)
Hunter population manager constructor.
Definition: Hunters_all.cpp:119
tohts_InitialState
Definition: Hunters_all.h:57
GooseHunter::FindHuntingLocation
bool FindHuntingLocation(void)
Locate the hunt for today.
Hunter::GetHuntLoc
APoint GetHuntLoc(unsigned a_ref)
Provide our hunting location coords.
Definition: Hunters_all.h:238
Hunter_Population_Manager::CheckDensity
bool CheckDensity(int a_ref, vector< int > *a_illegalfarms, vector< FarmOccupcancyData > *a_FarmOccupancy)
helper method to reduce code size in hunter rules - checks density rules
Definition: Hunters_all.cpp:300
Hunter_Population_Manager::m_HuntingSeasonEnd
int m_HuntingSeasonEnd
End of the overall hunting season.
Definition: Hunters_all.h:392
Hunter_Population_Manager::m_ActiveHuntingLocationsHunters
vector< HunterList * > m_ActiveHuntingLocationsHunters
Lists of hunters at all active hunting locations (updated daily)
Definition: Hunters_all.h:371
Hunter::CheckForGame
virtual int CheckForGame(void)
If the hunter checks for game at their hunting locations then this is done here. Must be overridden.
Definition: Hunters_all.h:179
TTypeOfHunters
TTypeOfHunters
Definition: Hunters_all.h:45
Hunter::ResetClock
void ResetClock()
Sets the clock back to zero.
Definition: Hunters_all.h:214
Hunter::m_clock
int m_clock
Records the time spent hunting per day.
Definition: Hunters_all.h:131
hlm_foobar
Definition: Hunters_all.h:72
Hunter::m_bag
int m_bag
The numbers of game items shot todate this year.
Definition: Hunters_all.h:133
Hunter::st_Resting
TypeOfHunterState st_Resting(void)
Finished hunting and waiting for the next opportunity.
Definition: Hunters_all.cpp:1185
Hunter::m_efficiency
double m_efficiency
Probability of 'hitting' a game item.
Definition: Hunters_all.h:147
Hunter::SaveMyData
virtual void SaveMyData(ofstream *)
Each hunter needs to save different kinds of data, so we use a polymorphic method for this.
Definition: Hunters_all.h:254
GooseHunter
The class for goose hunters encompsassing all their specific behaviours.
Definition: Hunters_all.h:268
Hunter_Population_Manager::AddHunterHunting
bool AddHunterHunting(int a_polyref, Hunter *a_hunter)
Adds a hunter hunting, returns true if that hunter is the leader otherwise false.
Definition: Hunters_all.cpp:1478
GooseHunter::InSeason
virtual bool InSeason(int day)
Is it goose hunting season? - MUST be overridden in descendent class.
Definition: Hunters_all.cpp:1271
GooseHunter::OnShotABird
void OnShotABird(int a_birdtype, int a_poly)
Message received when a goose is successully shot.
Definition: Hunters_all.cpp:1413
Hunter_Population_Manager::DoBefore
virtual void DoBefore()
Available for hunter management - not used currently.
Definition: Hunters_all.h:400
Hunter::m_Home
APoint m_Home
Definition: Hunters_all.h:155
Hunter::Init
virtual void Init(struct_Hunter *p_data)
Initiation of a basic hunter here.
Definition: Hunters_all.cpp:1086
Hunter_Population_Manager::DistributeHuntersByRules
void DistributeHuntersByRules(vector< HunterInfo > *a_hunterlist, int a_no_hunters, int a_ruleset)
Implements the rule sets to distributes hunters to hunting locations (farms).
Definition: Hunters_all.cpp:346
Hunter::InSeason
virtual bool InSeason(int)
Is it hunting season? - MUST be overridden in descendent class.
Definition: Hunters_all.h:242