public void attackBuilding(Unit attacker, Building toBeAttacked,
            boolean aiMove) {
        if (aiMove || Teams.comparePlayers(this.getOwner(),game.getCurrentPlayer())) {
            HashSet<Player> tmp = Teams.getTeamFriends(Teams
                    .getTeamOfPlayer(owner));
            if (attacker.getAttacked() == true) {
                game.mapPanel.Notify("A unit can only attack once per turn!");
            } else if (tmp.contains(toBeAttacked.getOwner())) {
                game.mapPanel.Notify("You cannot attack allied units!");
            } else {
                moveToCell(this, this.getCell(),
                        moveToAttack(toBeAttacked.getCell()), true);
                toBeAttacked.attacked(attacker);
                attacked = true;
            }
        } else {
            game.mapPanel.Notify("You can only attack buildings with your units!");
        }

    }