uni

University stuff
git clone git://git.margiolis.net/uni.git
Log | Files | Refs | README | LICENSE

Movable.hpp (407B)


      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() const;
     20 	int get_y() const;
     21 	int get_dir() const;
     22 	char get_sym() const;
     23 };
     24 
     25 #endif /* _MOVABLE_HPP_ */