ELEC2645 Joseph Allison 200860349
Dependencies: N5110 Tetris mbed
Diff: main.h
- Revision:
- 2:61caca4dd3f0
- Parent:
- 1:2b9ba34131ca
- Child:
- 3:8c5362716f4c
--- a/main.h Thu Apr 07 10:38:32 2016 +0000 +++ b/main.h Thu Apr 07 15:42:46 2016 +0000 @@ -26,8 +26,10 @@ N5110 lcd (PTE26 , PTA0 , PTC4 , PTD0 , PTD2 , PTD1 , PTC3); Serial pc(USBTX,USBRX); +//Tetris a (A1); + /** Creates Tertis instance*/ -Tetris tetris(); +Tetris tetris; /** Creates Ticker instance*/ Ticker ticker; @@ -59,12 +61,13 @@ InterruptIn spin(PTC5); InterruptIn down(PTC7); +//**** int musiccounter = 0; int score = 0; /*!< */ int completedlines = 0; int level = 1; -float gamespeed = 0.8; //how often a block moves down +double gamespeed = 0.8; //how often a block moves down //**** int pieceposition[2] = {4,0}; //set position of the current dropping piece *** @@ -128,7 +131,7 @@ */ void newShapeBag(); - +void movePiece(int x, int y,int spin); void movePieceRight();//moves the piece right void movePieceLeft();//moves the piece left void spinPiece(); //spins the piece clockwise @@ -178,7 +181,7 @@ //misc game flags volatile int g_newpiece = 1; -int harddropping = 0; +volatile int harddropping = 0;