summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/Character.hpp4
-rw-r--r--inc/Frame.hpp4
-rw-r--r--inc/List.hpp5
-rw-r--r--inc/Location.hpp1
4 files changed, 9 insertions, 5 deletions
diff --git a/inc/Character.hpp b/inc/Character.hpp
index 1a7dcdd..a1fc7b7 100644
--- a/inc/Character.hpp
+++ b/inc/Character.hpp
@@ -14,8 +14,8 @@ class Character
Character(char nSymbol, int nColor, Location L);
void move(Location L){l=L;}
void draw(WINDOW * w);
- void action(vector <Character> men);
- bool check(Location L, vector <Character> men);
+ void action(vector <Character> men, vector <Location> impassable);
+ bool check(Location L, vector <Character> men, vector <Location> impassable);
Location getLocation(){return l;}
char getSymbol(){return symbol;}
diff --git a/inc/Frame.hpp b/inc/Frame.hpp
index 4e4b57f..26a7364 100644
--- a/inc/Frame.hpp
+++ b/inc/Frame.hpp
@@ -27,15 +27,17 @@ class Frame
void refresh();
void move(int nRow, int nCol);
void center(Character &ch);
+ vector <Location> getImpassable(){return impassable;}
private:
int height, width;
int row, col;
bool hasSuper;
- bool colored = false;
+ bool filled;
WINDOW * w;
WINDOW * super;
vector <string> m;
+ vector <Location> impassable;
};
#endif
diff --git a/inc/List.hpp b/inc/List.hpp
index ce3f413..447903b 100644
--- a/inc/List.hpp
+++ b/inc/List.hpp
@@ -11,11 +11,12 @@ using namespace std;
class List
{
public:
- List();
+ List(vector <Location> i);
void draw(WINDOW * w);
void action();
private:
- vector <Character> men;
+ vector <Character> men;
+ vector <Location> impassable;
};
#endif
diff --git a/inc/Location.hpp b/inc/Location.hpp
index 5c6f1ea..ed0e2db 100644
--- a/inc/Location.hpp
+++ b/inc/Location.hpp
@@ -5,6 +5,7 @@ class Location
{
public:
Location(){x=0;y=0;}
+ Location(int xn, int yn){x=xn;y=yn;}
int x;
int y;
};