summaryrefslogtreecommitdiff
path: root/src/creature.cpp~
diff options
context:
space:
mode:
authorTom Barrett <tombarrett@cornell.engr.siu.edu>2015-05-01 14:02:12 -0500
committerTom Barrett <tombarrett@cornell.engr.siu.edu>2015-05-01 14:02:12 -0500
commit386279f378d49f6dddb276fbfde92fe1444b6ea1 (patch)
tree90beed57e495ac409cec72b5bf42e3d6fb702e68 /src/creature.cpp~
parent7cbc9334a09540627df8845bb9952196276ae6f9 (diff)
needs cleaning, hasnt been tested
Diffstat (limited to 'src/creature.cpp~')
-rw-r--r--src/creature.cpp~47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/creature.cpp~ b/src/creature.cpp~
new file mode 100644
index 0000000..15b6577
--- /dev/null
+++ b/src/creature.cpp~
@@ -0,0 +1,47 @@
+#include "creature.h"
+
+Creature::Creature(Window m, std::string s)
+{
+ texture = loadTexture(s, m);
+ renderer = m.getRenderer();
+ x=y=500;
+
+ //For the test resource
+ xT=yT=300;
+}
+
+void Creature::Behavior()
+{
+ //Detection
+
+ //Priorities
+
+ //Action
+ this->Action();
+}
+
+void Creature::Action()
+{
+ //if(isclose)
+ // eat//reproduce//etc;
+
+ if(x==xT)
+ {
+ if(y<yT)
+ y++;
+ else
+ y--;
+ }
+ else if(y==yT)
+ {
+ if(x<xT)
+ x++;
+ else
+ x--;
+ }
+ else
+ {
+
+
+ }
+}