summaryrefslogtreecommitdiff
path: root/src/List.cpp
diff options
context:
space:
mode:
authortom <tom@ground-control>2015-11-23 17:05:27 -0600
committertom <tom@ground-control>2015-11-23 17:05:27 -0600
commit9d9c1d29dbcd802c89641b70b5574361e775c0e4 (patch)
treebd66508d2db620db21db51c15276055d492297ea /src/List.cpp
parent8228cd7ef6156d87ccf33335466c86fa30dadd8b (diff)
added collision of trees and map border
Diffstat (limited to 'src/List.cpp')
-rw-r--r--src/List.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/List.cpp b/src/List.cpp
index d4bc796..fefb37d 100644
--- a/src/List.cpp
+++ b/src/List.cpp
@@ -1,8 +1,8 @@
#include "List.hpp"
-List::List()
+List::List(vector <Location> i)
{
- for(int i = 0; i < 50; i++)
+ for(int i = 0; i < 10; i++)
{
Location L;
L.x = 150;
@@ -10,6 +10,7 @@ List::List()
Character x ('@',4,L);
men.push_back(x);
}
+ impassable = i;
}
void List::draw(WINDOW * w)
@@ -21,5 +22,5 @@ void List::draw(WINDOW * w)
void List::action()
{
for(int i = 0; i < men.size(); i++)
- men[i].action(men);
+ men[i].action(men,impassable);
}