Advertisement
Guest User

durbl

a guest
Nov 28th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. #ifndef tetris_h
  2. #define tetris_h
  3.  
  4. #include <iostream>
  5. #include <stdio.h>
  6. #include <cstdlib>
  7. #include <math.h>
  8.  
  9. using namespace std;
  10.  
  11. class Tetris {
  12. // class TutorialApplication : public BaseApplication
  13. // {
  14. // public:
  15. // TutorialApplication(void);
  16. // virtual ~TutorialApplication(void);
  17. //
  18. // protected:
  19. // virtual void createScene(void);
  20. // virtual bool frameRenderingQueued(const Ogre::FrameEvent& evt);
  21. // virtual void createCamera(void);
  22. // virtual void createViewports(void);
  23. // private:
  24. // bool processUnbufferedInput(const Ogre::FrameEvent& evt);
  25. // };
  26. int mainGrid[22][10];
  27. int pieceGrid[22][10];
  28. char piece;
  29. int activeX = 0;
  30. int activeY = 0;
  31. int activeSize = 4;
  32. float oldTime;
  33. public:
  34. Tetris(void);
  35. void spawnJ();
  36. void spawnI();
  37. void spawnL();
  38. void spawnT();
  39. void spawnO();
  40. void spawnZ();
  41. void spawnS();
  42. int rotateLeft();
  43. int rotateRight();
  44. void drop();
  45. void hardDrop();
  46. void getArray(int returnGrid[][10]);
  47.  
  48. private:
  49. void tick();
  50. void resetPieceGrid();
  51.  
  52. };
  53.  
  54. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement