From 7f79b2e216617ff74ebd41ac02663b20ef3d0904 Mon Sep 17 00:00:00 2001 From: tom Date: Sat, 21 Nov 2015 12:30:13 -0600 Subject: began adding collision *added a location class for ease *much refractoring needed to fully implement it* --- inc/Character.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'inc/Character.hpp') diff --git a/inc/Character.hpp b/inc/Character.hpp index f2753a9..1f948f2 100644 --- a/inc/Character.hpp +++ b/inc/Character.hpp @@ -2,18 +2,28 @@ #define character_h #include +#include +#include +#include +#include "Location.hpp" +using namespace std; class Character { public: Character(char nSymbol, int nColor,int nRow, int nCol); - void move(int nRow, int nCol); + void move(Location L); void draw(WINDOW * w); + bool action(vector occupied); + bool check(Location L, vector occupied); int getRow(); int getCol(); + Location getLocation(){return l;} char getSymbol(); private: + string order = "wander"; + Location l; char symbol; int row; int col; -- cgit v1.2.3