public boolean contains(final Point point) {
        Point[] bounds = {new Point(0.0, 0.0), new Point(0.0, 10.0), new Point(10.0, 0.0), new Point(10.0, 10.0)};      
        boolean intersected;
        for (int i = 0; i < bounds.length; i++) {
            intersected = false;
            //This loop checks that a line drawn from point to one of the bounds intersects with at least one edge of the polygon.
            //If it does not then the point must be on the outside. Note that false positives are possible with strange shapes that
            //surround the point like Pacman eating a power pellet.
            for (int j = 0; j < numPoints && !intersected; j++) {
                if (checkIntersects(point, bounds[i], points.get(j), points.get((j + 1) % numPoints))) {
                    intersected = true;
                }
            }
            if (!intersected) {
                return false;
            }
        }
        return true;
    }