public boolean isWithinObject(Point point) {
        int enemyX = getPixelPosition().getX();
        int enemyY = getPixelPosition().getY();
        int width = Board.getSquareWidth();
        int height = Board.getSquareHeight();
        int pointX = point.getX();
        int pointY = point.getY();

        // if point is between the leftmost and rightmost pixel of the object in X
        // and between the highest and lowest pixel in Y return true.
        if ((enemyX <= pointX && pointX <= (enemyX+width)) &&
                (enemyY <= pointY && pointY <= (enemyY+height))) {
            return true;
        }
        return false;
    }