for (Obstacle obs : obstacleList) {
// The PlayerTank will push the crate if it is movable
if (obs instanceof Crate) {
Crate c = (Crate) obs;
if (rect.intersects(c.getRectangle())) {
c.move(tankList.getFirst().getDirection());
}
}
// The PlayerTank will push the TNT if it is movable
if (obs instanceof TNT) {
TNT c = (TNT) obs;