Projekty z kursu Systemy operacyjne 2 na PWr
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

123456789101112131415161718192021222324252627282930
  1. #ifndef BRICK_H
  2. #define BRICK_H
  3. #include <iostream>
  4. #include <thread>
  5. #include <unistd.h>
  6. class Brick
  7. {
  8. public:
  9. Brick(int xPosition, int descentRate);
  10. ~Brick();
  11. static void initScene(int xRes, int yRes);
  12. int getxPosition();
  13. int getyPosition();
  14. bool isFalling();
  15. std::thread fallThread();
  16. protected:
  17. private:
  18. static bool initialized;
  19. static int xMax;
  20. static int yMax;
  21. int xPosition;
  22. int yPosition;
  23. int descentRate;
  24. bool falling;
  25. void fall();
  26. };
  27. #endif // BRICK_H