From 22cd24a1fe33b6bc9f52a600feb5cdb8d868d50f Mon Sep 17 00:00:00 2001 From: tom Date: Tue, 5 May 2015 15:25:32 -0500 Subject: 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 --- src/creature.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/creature.cpp') 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; -- cgit v1.2.3