summaryrefslogtreecommitdiff
path: root/src/creature.cpp
diff options
context:
space:
mode:
authortom <tom@ground-control>2015-05-05 15:25:32 -0500
committertom <tom@ground-control>2015-05-05 15:25:32 -0500
commit22cd24a1fe33b6bc9f52a600feb5cdb8d868d50f (patch)
treea2c854b5ed2b746017bd975a241f85b7080ffa4c /src/creature.cpp
parentafcf5f509a318ee66a16690f204f03dee701722e (diff)
fixed list to make it easy to add more creatures/resources.
need to figure out how to generate more random numbers after - implement resource amount and ability to eat
Diffstat (limited to 'src/creature.cpp')
-rw-r--r--src/creature.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/creature.cpp b/src/creature.cpp
index c9f9fa0..8e86c0d 100644
--- a/src/creature.cpp
+++ b/src/creature.cpp
@@ -4,7 +4,14 @@ Creature::Creature(Window m, std::string s)
{
texture = loadTexture(s, m);
renderer = m.getRenderer();
- x=y=500;
+
+ srand(time(NULL));
+ int z = rand()%800;
+ y=z;
+
+ z = rand()%800;
+ x=z;
+ std::cout << x << ' ' << y << std::endl;
//For the test resource
xT=yT=300;