projects
/
vexed
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed bug when block can slide over the same one
[vexed]
/
playfield.cpp
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
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;
do
{
cont=false;