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.
Fork of Tetris by
Diff: Tetris/playGround.h
- Revision:
- 7:0e426e81c566
- Parent:
- 6:d2aa47c92687
--- a/Tetris/playGround.h Sat Mar 18 23:53:12 2017 +0000 +++ b/Tetris/playGround.h Sat Aug 18 22:20:38 2018 +0000 @@ -1,9 +1,25 @@ +#ifndef PLAYGROUND_H +#define PLAYGROUND_H + + #include "mbed.h" #include "RA8875.h" #include "Block.h" #include "Define.h" #include "Field.h" +typedef enum { + drop = 0, + move_right = 1, + move_left = 2, + spin_cw = 3, + spin_ccw = 4, + ignore = 13 +} gesture_t; + +extern RA8875 TFT; +extern RawSerial pc; + void TFTInit(); void ReInitGame(); bool ReplayTouched(); @@ -12,10 +28,12 @@ void drawBlock(Block NewBlock); void drawFrame(); void clrBlock(Block NewBlock); -int getGesture(); -bool TouchStatus(); -Block doGest(Block NewBlock); +gesture_t getGesture(); +Block doGest(Block NewBlock, point_t p); void gameOver(int score); void drawScore(int score); +void drawPeriod(int period); void drawNextBlock(Block NewBlock); -void clrNextBlock(Block NewBlock); \ No newline at end of file +void clrNextBlock(Block NewBlock); + +#endif // PLAYGROUND_H