From 9d9c1d29dbcd802c89641b70b5574361e775c0e4 Mon Sep 17 00:00:00 2001 From: tom Date: Mon, 23 Nov 2015 17:05:27 -0600 Subject: added collision of trees and map border --- src/List.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/List.cpp') 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 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); } -- cgit v1.2.3