Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef tetris_h
- #define tetris_h
- #include <iostream>
- #include <stdio.h>
- #include <cstdlib>
- #include <math.h>
- using namespace std;
- class Tetris {
- // class TutorialApplication : public BaseApplication
- // {
- // public:
- // TutorialApplication(void);
- // virtual ~TutorialApplication(void);
- //
- // protected:
- // virtual void createScene(void);
- // virtual bool frameRenderingQueued(const Ogre::FrameEvent& evt);
- // virtual void createCamera(void);
- // virtual void createViewports(void);
- // private:
- // bool processUnbufferedInput(const Ogre::FrameEvent& evt);
- // };
- int mainGrid[22][10];
- int pieceGrid[22][10];
- char piece;
- int activeX = 0;
- int activeY = 0;
- int activeSize = 4;
- float oldTime;
- public:
- Tetris(void);
- void spawnJ();
- void spawnI();
- void spawnL();
- void spawnT();
- void spawnO();
- void spawnZ();
- void spawnS();
- int rotateLeft();
- int rotateRight();
- void drop();
- void hardDrop();
- void getArray(int returnGrid[][10]);
- private:
- void tick();
- void resetPieceGrid();
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement