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