diff --git a/cicaprojekt/Player.java b/cicaprojekt/Player.java index 2dad2d4..5a5342f 100644 --- a/cicaprojekt/Player.java +++ b/cicaprojekt/Player.java @@ -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