diff options
author | tom <tom@ground-control> | 2015-05-05 21:01:52 -0500 |
---|---|---|
committer | tom <tom@ground-control> | 2015-05-05 21:01:52 -0500 |
commit | aaf0a73578ecbb8212e0d224d6fff68a229b1f48 (patch) | |
tree | 46f6d91c1bc02e434812af59477e11fb5e521713 /src/list.cpp | |
parent | 22cd24a1fe33b6bc9f52a600feb5cdb8d868d50f (diff) |
fleshed out list, locations of all creatures and resources are now within
Diffstat (limited to 'src/list.cpp')
-rw-r--r-- | src/list.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/list.cpp b/src/list.cpp index 7d6f10e..b8a809c 100644 --- a/src/list.cpp +++ b/src/list.cpp @@ -2,28 +2,41 @@ List::List(Window m) { - Creature X0(m,"img/Cbasic.png"); - C.push_back(X0); - Creature X1(m,"img/Cbasic.png"); - C.push_back(X1); + int i; + for(i=0;i<5;i++) + { + Creature X = Creature(m,"img/Cbasic.png"); + C.push_back(X); + } - Resource Y(m,"img/Rbasic.png"); - R.push_back(Y); -}; + for(i=0;i<5;i++) + { + Resource Y(m,"img/Rbasic.png"); + R.push_back(Y); + L.push_back(Y.getLocation()); + } +} void List::Behavior() { int i; for(i = 0; i < C.size(); i++) + { C[i].Behavior(); + } } void List::Place() { int i; for(i = 0; i < C.size(); i++) + { C[i].Place(); + L.push_back(C[i].getLocation()); + } for(i = 0; i < R.size(); i++) + { R[i].Place(); + } } |