#include using namespace std; inline void clear_screen() { cout << "\x1b[2J"; } inline void set_cur_pos( int r, int c ) { cout << "\x1b[" << r << ";" << c << "H"; } inline char getch() { char ch; cin.get(ch); return ch; } /**************** class figure ****************************/ class figure{ protected: int row, col; public: figure( int x, int y ); virtual ~figure(){} virtual void draw() = 0; virtual void erase() = 0; void move( int x, int y ); }; /**************** class rect ****************************/ class rect : public figure{ int height, width; public: rect( int c, int r, int w, int h ); void draw(); void erase(); }; /**************** class text ****************************/ class text : public figure{ char* txt; public: text( int c, int r, char* t ); ~text(){ delete txt; }; void draw(); void erase(); };