Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE Physac-MBED PinDetect SDFileSystem mbed-rtos mbed
Diff: Tetris/Game.h
- Revision:
- 19:6d9bee043ede
- Parent:
- 18:cf74968078ea
- Child:
- 20:73e4f12277bd
diff -r cf74968078ea -r 6d9bee043ede Tetris/Game.h
--- a/Tetris/Game.h Thu Dec 01 01:46:22 2022 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#ifndef _GAME_
-#define _GAME_
-
-// ------ Includes -----
-
-#include "Board.h"
-#include "Pieces.h"
-#include "uLCD_4DGL.h"
-
-// ------ Defines -----
-
-#define WAIT_TIME 700 // Number of milliseconds that the piece remains before going 1 block down */
-
-
-// -----------------------------------------------------
-// Game
-// -----------------------------------------------------
-
-class Game
-{
-public:
-
- Game (Board *pBoard, Pieces *pPieces, int pScreenHeight, uLCD_4DGL *uLCD,int,int,int,int);
-
- void DrawScene ();
- void CreateNewPiece (int,int);
-
- void ErasePiece(int x,int y,int piece, int rotation);
- void DrawBoard ();
- void AddPoints(int);
- void AddClearedLines(int);
- int GetPoints();
- int GetClearedLines();
-
- int mPosX, mPosY; // Position of the piece that is falling down
- int mPiece, mRotation; // Kind and rotation the piece that is falling down
-
- int points;
- int clearedLineCount;
-
-
-private:
-
- int mScreenHeight; // Screen height in pixels
- int mNextPosX, mNextPosY; // Position of the next piece
- int mNextPiece, mNextRotation; // Kind and rotation of the next piece
-
- Board *mBoard;
- Pieces *mPieces;
- uLCD_4DGL *uLCD;
-
-
- void InitGame(int,int,int,int);
- void DrawPiece (int pX, int pY, int pPiece, int pRotation, int colorIndex);
-
-};
-
-#endif // _GAME_