From 2ae8b5dcd1692ead98f0b318273b6341f74bdbc8 Mon Sep 17 00:00:00 2001 From: paul romanchenko Date: Mon, 27 Sep 2010 08:59:40 +0400 Subject: [PATCH] Fixed bug when block can slide over the same one --- playfield.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/playfield.cpp b/playfield.cpp index 2f4e381..626d4bd 100644 --- a/playfield.cpp +++ b/playfield.cpp @@ -66,7 +66,10 @@ void PlayField::move(int w, int h, int w_new) moves++; moved=true; }//if coordination has changed, inc the moves - } while(cont && (w!=w_new) && ((h_below >= PF::FIELD_HEIGHT) || get(w,h_below)!=PF::CELL_EMPTY)); + } while(cont && // still moving + (w!=w_new) && // didn't arrived + ((h_below >= PF::FIELD_HEIGHT) || (get(w,h_below)!=PF::CELL_EMPTY && get(w,h_below) != get(w,h))) // there is something below + ); do { cont=false; -- 1.7.9.5