Boxes now cannot be put on walls -- and other places, where they don't belong

fixes #8
This commit is contained in:
Bokros Bálint 2016-05-13 20:54:17 +02:00
parent 6700c33b8d
commit cb99f84ded

View File

@ -22,9 +22,12 @@ public class Player extends PlayerBase {
} }
public void boxDrop() { public void boxDrop() {
currentTile.getAdjacentTile(facingDirection).putABox(boxLifted); Tile target = currentTile.getAdjacentTile(facingDirection);
if(target.isSteppable()) {
target.putABox(boxLifted);
boxLifted = null; boxLifted = null;
} }
}
@Override @Override
public void pickZPM(Tile tile) { public void pickZPM(Tile tile) {