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: mbed
TetrisGame/TetrisGame.h
- Committer:
- el18rs
- Date:
- 2020-06-01
- Revision:
- 8:cebb2aca8e19
- Parent:
- 6:39cbec524483
- Child:
- 9:58103274b2ab
File content as of revision 8:cebb2aca8e19:
#ifndef TETRISGAME_H #define TETRISGAME_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Tetromino.h" class TetrisGame { public: TetrisGame(); ~TetrisGame(); void init(int height, int width); void read_input(Gamepad &pad); void update(Gamepad &pad, N5110 &lcd); void draw(N5110 &lcd); //void play_game(); private: void check_wall_collision(Gamepad &pad, N5110 &lcd); void check_tetromino_collisions(Gamepad &pad, N5110 &lcd); // void check_score(Gamepad &pad); void cancel_line(N5110 &lcd); void exit_game(N5110 &lcd); // Tetromino _p1; int _x; int _y; int _height; int _width; int _speed; Tetromino _tetromino; Direction _d; float _mag; }; #endif