projects
/
vexed
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d05a754
)
Fixed bug when block can slide over the same one
master
author
paul romanchenko
<paulaner@gmail.com>
Mon, 27 Sep 2010 04:59:40 +0000
(08:59 +0400)
committer
paul romanchenko
<paulaner@gmail.com>
Mon, 27 Sep 2010 04:59:40 +0000
(08:59 +0400)
playfield.cpp
patch
|
blob
|
history
diff --git
a/playfield.cpp
b/playfield.cpp
index
2f4e381
..
626d4bd
100644
(file)
--- 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;