summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortom <tom@ground-control>2015-11-21 15:06:26 -0600
committertom <tom@ground-control>2015-11-21 15:06:26 -0600
commit86bf68cc1f2cc81589acc2c35c4875a1230b0267 (patch)
tree812269481ed2242f29eb169278d6694f5a88641b
parentf198372b1c9f5cccdfbfc6cf57d8716a53be5bc8 (diff)
didnt get everything
-rw-r--r--inc/Character.hpp12
-rw-r--r--inc/Frame.hpp3
-rw-r--r--inc/Location.hpp1
3 files changed, 6 insertions, 10 deletions
diff --git a/inc/Character.hpp b/inc/Character.hpp
index 1f948f2..607e8ea 100644
--- a/inc/Character.hpp
+++ b/inc/Character.hpp
@@ -11,15 +11,13 @@ using namespace std;
class Character
{
public:
- Character(char nSymbol, int nColor,int nRow, int nCol);
- void move(Location L);
+ Character(char nSymbol, int nColor, Location L);
+ void move(Location L){l.x=L.x;l.y=L.y;}
void draw(WINDOW * w);
- bool action(vector <Location> occupied);
- bool check(Location L, vector <Location> occupied);
- int getRow();
- int getCol();
+ Location action(vector <Location> occupied);
+ bool check(Location L, vector <Location> occupied);
Location getLocation(){return l;}
- char getSymbol();
+ char getSymbol(){return symbol;}
private:
string order = "wander";
diff --git a/inc/Frame.hpp b/inc/Frame.hpp
index 89242ff..cc87090 100644
--- a/inc/Frame.hpp
+++ b/inc/Frame.hpp
@@ -26,9 +26,6 @@ class Frame
void fillWindow();
void refresh();
void move(int nRow, int nCol);
- //void add(Character &c);
- //void add(Character &c, int nRow, int nCol);
- void erase(Character &c);
void center(Character &ch);
private:
diff --git a/inc/Location.hpp b/inc/Location.hpp
index 458e77e..5c6f1ea 100644
--- a/inc/Location.hpp
+++ b/inc/Location.hpp
@@ -4,6 +4,7 @@
class Location
{
public:
+ Location(){x=0;y=0;}
int x;
int y;
};