uni

University stuff
git clone git://git.christosmarg.xyz/uni-assignments.git
Log | Files | Refs | README | LICENSE

Movable.hpp (383B)


      1 #ifndef _MOVABLE_HPP_
      2 #define _MOVABLE_HPP_
      3 
      4 class Movable {
      5 protected:
      6 	int x;
      7 	int y;
      8 	int dir;
      9 	char sym;
     10 
     11 public:
     12 	enum Direction { LEFT, RIGHT, UP, DOWN };
     13 
     14 public:
     15 	explicit Movable(int x, int y, int dir, char sym);
     16 	virtual ~Movable();
     17 
     18 	void set_newpos(int dir, int xmax, int ymax);
     19 	int get_x();
     20 	int get_y();
     21 	int get_dir();
     22 	char get_sym();
     23 };
     24 
     25 #endif /* _MOVABLE_HPP_ */