public boolean canAttackCell(Unit attackingUnit) {
        // attackable unit

        if (getUnit() != null) {
            // check not on friendly teams
            if (!Teams.getTeamFriends(
                    Teams.getTeamOfPlayer(attackingUnit.getOwner())).contains(
                            getUnit().getOwner())) {
                return true;
            } else {
                return false;
            }

            // attackable unit
        } else if (getBuilding() != null) {

            if (!Teams.getTeamFriends(
                    Teams.getTeamOfPlayer(attackingUnit.getOwner())).contains(
                            getBuilding().getOwner())) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }