SHARE
TWEET

Character.h

zCool May 20th, 2012 28 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef CHARACTER_H
  2. #define CHARACTER_H
  3.  
  4. #include "Entity.h"
  5. #include <string>
  6.  
  7. class Character:public Entity
  8. {
  9. public:
  10.     enum directions
  11.         {
  12.           EAST,
  13.           WEST,
  14.           NORTH,
  15.           SOUTH
  16.         };
  17.         Character(int X, int Y, std::string sprite, int score);
  18.         int getScore() { return m_score; }
  19.         void move(Character::directions direction);
  20.         void undoMove(Character::directions direction);
  21.         void setX(int X) { m_X = X; }
  22.         void setY(int Y) { m_Y = Y; }
  23.         void increaseScore() { m_score++; }
  24.        
  25.  
  26. protected:
  27.     int m_score;
  28. };
  29.  
  30. #endif
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top