-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSquare.h
51 lines (36 loc) · 996 Bytes
/
Square.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//---------------------------------------------------------------------------
#ifndef SquareH
#define SquareH
#include <list>
#include "Tree.h"
//---------------------------------------------------------------------------
const double Pi = 3.14159265358979323846;
class CTree;
class CSquare
{
public:
static int sqSize; //side length of the squares
//index coordinates
int iX;
int iY;
//coordinates in meters
double X;
double Y;
int nTrees;
int nTrees_t0;
int nSpec_t0;
int nRecruits_t1;
int nDeath_t1;
double pDeath; //specific mortality rate for each square
double pRec; //specific mortality rate for each square
std::vector<CTree*> TreeList; //list of trees in the square
std::vector<CTree*> RecruitList;
std::map<int,int> SpecMap;
CSquare();
CSquare(int ix, int iy);
~CSquare();
void InitSquare(int ix, int iy);
};
typedef std::vector<CSquare*>::iterator SquareIterV;
//---------------------------------------------------------------------------
#endif