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
1 changed files with 5 additions and 2 deletions

View File

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