Advertisement
baadgeorge

classesh1

May 31st, 2021
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. #pragma once
  2. class Location
  3. {
  4. protected:
  5. int X;
  6. int Y;
  7. public:
  8. Location(int _X, int _Y);
  9. ~Location();
  10. int GetX();
  11. int GetY();
  12. };
  13.  
  14. class Point : public Location
  15. {
  16. protected:
  17. bool isVisible;
  18.  
  19. public:
  20. Point(int _X, int _Y);
  21. ~Point();
  22.  
  23. virtual void Show();
  24. virtual void Hide();
  25.  
  26. void SetX(int _X);
  27. void SetY(int _Y);
  28.  
  29. void MoveTo(int NewX, int NewY);
  30. void Drag(int Step);
  31. };
  32.  
  33. class Wheel : public Point
  34. {
  35. protected:
  36. int Radius;
  37. double Angle;
  38. public:
  39. Wheel(int _X, int _Y, int _Radius);
  40. ~Wheel();
  41.  
  42. virtual void Show();
  43. virtual void Hide();
  44.  
  45. void SetAngle(double _Angle);
  46. double GetAngle();
  47. //void Rotate();
  48. };
  49.  
  50. class Grinder : public Point
  51. {
  52. protected:
  53. int Scale;
  54. Wheel wheel;
  55.  
  56. public:
  57. Grinder(int _X, int _Y, int _Scale, double _Angle);
  58. ~Grinder();
  59.  
  60. virtual void Show();
  61. virtual void Hide();
  62. void ChangeSize(int delta);
  63.  
  64. double GetAngleWH();
  65. void SetAngleWH(double _Angle);
  66.  
  67. };
  68.  
  69. class Rock : public Point
  70. {
  71. protected:
  72. int Scale;
  73. public:
  74. Rock(int _X, int _Y, int Scale);
  75. ~Rock();
  76.  
  77. virtual void Show();
  78. virtual void Hide();
  79. };
  80.  
  81. class River : public Point
  82. {
  83. protected:
  84. int Scale;
  85. public:
  86. River(int _X, int _Y, int _Scale);
  87. ~River();
  88. virtual void Show();
  89. virtual void Hide();
  90.  
  91. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement