All there but errors need fixing
Embed:
(wiki syntax)
Show/hide line numbers
TetrisGame.h
00001 #ifndef TETRISGAME_H 00002 #define TETRISGAME_H 00003 00004 #include "mbed.h" 00005 #include "N5110.h" 00006 #include "Gamepad.h" 00007 #include "Tetromino.h" 00008 00009 class TetrisGame 00010 { 00011 00012 public: 00013 TetrisGame(); 00014 ~TetrisGame(); 00015 00016 void init(int number, int x, int y, int speed); 00017 void read_input(Gamepad &pad); 00018 void update(Gamepad &pad); 00019 void draw(N5110 &lcd); 00020 //void play_game(); 00021 void exit_game(); 00022 void cancel_line(); 00023 00024 private: 00025 00026 void check_wall_collision(Gamepad &pad); 00027 void check_tetromino_collisions(); 00028 // void check_score(Gamepad &pad); 00029 00030 // void cancel_line(N5110 &lcd); 00031 // void gameover(N5110 &lcd); 00032 00033 Tetromino _p1; 00034 00035 int _number; 00036 int _x; 00037 int _y; 00038 int _speed; 00039 int blocknumber; 00040 int blockArray[5]; 00041 00042 //_old_tetromino; 00043 00044 // int _p1x; 00045 00046 Tetromino _tetromino; 00047 00048 Direction _d; 00049 float _mag; 00050 }; 00051 00052 #endif
Generated on Wed Jul 13 2022 22:47:28 by
1.7.2