From: gumartinm Date: Sun, 6 Nov 2011 21:37:56 +0000 (+0100) Subject: Fix bottom boundary X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=a1180f96842586846f89135a5d386af6aac4d218;p=JavaForFun Fix bottom boundary --- diff --git a/AndroidTetris/src/de/android/androidtetris/DrawView.java b/AndroidTetris/src/de/android/androidtetris/DrawView.java index 2583f11..97297d6 100644 --- a/AndroidTetris/src/de/android/androidtetris/DrawView.java +++ b/AndroidTetris/src/de/android/androidtetris/DrawView.java @@ -220,7 +220,7 @@ public class DrawView extends SurfaceView { for(int x=0; x<4; x++) for(int y=0; y<4; y++) if(currentPiece.size[x][y] != Tile.NOCOLOR) - if (newy + y > MAPHEIGHT) + if (newy + y == MAPHEIGHT) return true; //Check collisions