SHARE
TWEET

Untitled

a guest Mar 20th, 2017 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef rocks_h
  2. #define rocks_h
  3.  
  4. #define BIG_ROCK_SIZE 16
  5. #define MEDIUM_ROCK_SIZE 8
  6. #define SMALL_ROCK_SIZE 4
  7.  
  8. #define BIG_ROCK_SPIN 2
  9. #define MEDIUM_ROCK_SPIN 5
  10. #define SMALL_ROCK_SPIN 10
  11.  
  12. #include "flyingObject.h"
  13. #include "point.h"
  14. #include "uiDraw.h"
  15. #include "velocity.h"
  16.  
  17. // Define the following classes here:
  18. //   Rock
  19. class Rock : public FlyingObject
  20. {
  21. public:
  22.     Rock();
  23.     void setRotation(int rotation) { this->rotation = rotation;}
  24.     int getRotation() { return rotation; }
  25.     virtual int getRotationChange() = 0;
  26. protected:
  27.     int rotation;
  28. };
  29.  
  30.  
  31. //   BigRock
  32. class BigRock : public Rock
  33. {
  34. public:
  35.     BigRock() {};
  36.     virtual void draw();
  37.     virtual void advance(Rock & bigRock) {};
  38.     virtual int getRotationChange() { return BIG_ROCK_SPIN;}
  39. };
  40.  
  41. //   MediumRock
  42. class MediumRock : public Rock
  43. {
  44. public:
  45.     MediumRock() {};
  46.     virtual void draw();
  47.     virtual void advance(Rock & mediumRock) {};
  48.     virtual int getRotationChange() {return MEDIUM_ROCK_SPIN;}
  49. };
  50.  
  51.  
  52. //   SmallRock
  53. class SmallRock : public Rock
  54. {
  55. public:
  56.     SmallRock() {};
  57.     virtual void draw();
  58.     virtual void advance(Rock & smallRock) {};
  59.     virtual int getRotationChange() {return SMALL_ROCK_SPIN;}
  60. };
  61.  
  62. #endif /* rocks_h */
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top