All there but errors need fixing

Dependencies:   mbed

Overview:

Rookie Tetris is a jigsaw style game based on the classic Tetris.

A block will appear at the top of the screen, you must move it (your options for movement are left, right and down - you cannot move up the board). The block will stop when it if placed either on the floor of the board or on-top of another block.

Your goal is to fill a complete row of the board with the blocks; when you do so the row will delete and the pattern above it will drop down. The game is over when your pattern is tall enough to reach to the top of the board!

Controls:

Use the joystick to move your block! Your block cannot move out of the parameters of the board.

Pot 2 controls the contrast of the screen.

Revision:
23:cbfa9d1ee3db
Parent:
20:ad685b35a1a4
Child:
25:a7c89c54454a
diff -r 403759d2f093 -r cbfa9d1ee3db Tetromino/Tetromino.cpp
--- a/Tetromino/Tetromino.cpp	Wed Jun 03 16:44:09 2020 +0000
+++ b/Tetromino/Tetromino.cpp	Wed Jun 03 19:52:59 2020 +0000
@@ -2,22 +2,22 @@
 
 Tetromino::Tetromino()
 {
-    
+
 }
 
 Tetromino::~Tetromino()
 {
-    
+
 }
 
-void Tetromino::init(int x, int y) 
+void Tetromino::init(int x, int y)
 {
     _x = x;
     _y = y;
-    
+
 //    _height = height;
 //    _width = width;
-    
+
     _speed = 1;
 
 }
@@ -30,7 +30,7 @@
 void Tetromino::update(Direction d, float mag)
 {
     _speed = int(mag*2.5f);
-    
+
     if (d == N) {
         _y-=_speed;
 //        printf("d = %i, x = %i, y = %i, speed = %i\n",d,_x,_y,_speed);
@@ -43,12 +43,11 @@
         _x-=_speed;
 //        printf("d = %i, x = %i, y = %i, speed = %i\n",d,_x,_y,_speed);
     }
-        
+
     if (_x < 20) {
         _x = 20;
         printf("left wall hit\n");
-    }
-    else if (_x > 56) {
+    } else if (_x > 56) {
         _x = 56;
         printf("right wall hit\n");
     }
@@ -56,19 +55,8 @@
 //    printf("front corner of block = (%i, %i)\n",_x+3,_y+3);
 }
 
-/*void Tetromino::set_velocity(Vector2D v)
+Vector2D Tetromino::get_pos()
 {
-    _velocity.x = v.x;
-    _velocity.y = v.y;
-}*/
-
-Vector2D Tetromino::get_velocity()
-{
-    Vector2D v = {_velocity.x,_velocity.y};
-    return v;
-}
-
-Vector2D Tetromino::get_pos() {
     Vector2D p = {_x,_y};
     return p;
 }
\ No newline at end of file