summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/creature.hpp9
-rw-r--r--inc/list.hpp3
-rw-r--r--inc/location.hpp17
-rw-r--r--inc/main.hpp1
-rw-r--r--inc/resource.hpp5
-rw-r--r--inc/window.hpp1
6 files changed, 33 insertions, 3 deletions
diff --git a/inc/creature.hpp b/inc/creature.hpp
index ab4b328..f72dfbc 100644
--- a/inc/creature.hpp
+++ b/inc/creature.hpp
@@ -2,17 +2,22 @@
#define creature_h
#include "entity.hpp"
+#include "location.hpp"
class Creature: public Entity
{
public:
Creature(Window m, std::string s);
void Behavior();
- void Action();
-
+ void Action();
+ Location getLocation();
+
private:
int xT;
int yT;
+ int hp;
+ int hu;
+ Location K[3];
};
#endif
diff --git a/inc/list.hpp b/inc/list.hpp
index 240fa95..203ad7f 100644
--- a/inc/list.hpp
+++ b/inc/list.hpp
@@ -4,6 +4,7 @@
#include "creature.hpp"
#include "resource.hpp"
#include "window.hpp"
+#include "location.hpp"
class List
{
@@ -16,7 +17,7 @@ class List
//Window main;
std::vector<Resource> R;
std::vector<Creature> C;
- int ** L;
+ std::vector<Location> L;
};
#endif
diff --git a/inc/location.hpp b/inc/location.hpp
new file mode 100644
index 0000000..c4428f5
--- /dev/null
+++ b/inc/location.hpp
@@ -0,0 +1,17 @@
+#ifndef location_h
+#define location_h
+
+class Location
+{
+ public:
+ Location(){x=y=t=0;};
+ Location(int x, int y, int z){};
+ int getType(){return t;};
+
+ private:
+ int x;
+ int y;
+ int t;
+};
+
+#endif
diff --git a/inc/main.hpp b/inc/main.hpp
index 4360cf9..c6f51e3 100644
--- a/inc/main.hpp
+++ b/inc/main.hpp
@@ -7,5 +7,6 @@
#include "creature.hpp"
#include "resource.hpp"
#include "list.hpp"
+#include "location.hpp"
#endif
diff --git a/inc/resource.hpp b/inc/resource.hpp
index 986a03d..2738f44 100644
--- a/inc/resource.hpp
+++ b/inc/resource.hpp
@@ -2,11 +2,16 @@
#define resource_h
#include "entity.hpp"
+#include "location.hpp"
class Resource: public Entity
{
public:
Resource(Window m, std::string s);
+ Location getLocation();
+
+ private:
+ int amount;
};
#endif
diff --git a/inc/window.hpp b/inc/window.hpp
index 2f65b04..d3436d8 100644
--- a/inc/window.hpp
+++ b/inc/window.hpp
@@ -1,6 +1,7 @@
#ifndef window_h
#define window_h
+//Theres alot here that are probs not used needs cleaning
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <string>