-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsquare.h
More file actions
60 lines (49 loc) · 1.27 KB
/
square.h
File metadata and controls
60 lines (49 loc) · 1.27 KB
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
52
53
54
55
56
57
58
59
60
#pragma once
#include <bits/stdc++.h>
#include <string>
#include <iostream>
#include <list>
#include <iterator>
class Grid;
enum climate {
TropicalWet, TropicalMonsoon, TropicalDry, DryArid, DrySemi, MildMedi, MildHumid, MildMarine, ContiWarm,
ContiCool, ContiSubartic, PolarTundra, PolarIce
};
enum tempZone { //Köppen climate classification is more specific but less useful for this mayhaps? I don't know
Frigid, Temperate, Torrid //subtropic and tropic classification instead of Torrid?
};
class Square
{
public:
char graphic; //representation of Square in-simulation
int loc; //index in current Grid
int height;
std::string desc; //Description for square.
Grid *grid;
int food;
climate clim;
tempZone zone;
Square();
Square(int i);
Square(char c, int i, int h, std::string d, Grid* g, int f, climate cl, tempZone z);
void updateGraphic(char g);
void updateDesc(std::string str);
/*
void populateGrid() {
for (int i = 0; i < 400; ++i) {
this->grid.push_back(Square(DIRT_CHAR, i, DIRT_DESC, ));
}
}
*/
void setGrid(Grid *g);
Grid* & getGrid();
char & getGraphic();
int & getIndex();
int & getHeight();
void updateHeight(int h);
std::string & getDesc();
int & getFoodVal();
climate & getClimate();
tempZone & getZone();
void setZone(tempZone tz);
};