public final Point sanitizeCoordinates(final Point p) {
        final int width = Parameter.FIELD_WIDTH.getValue();
        final int height = Parameter.FIELD_HEIGHT.getValue();
        if (p.x < 0) {
            return sanitizeCoordinates(new Point(p.x + width, p.y));
        }

        if (p.x >= width) {
            return sanitizeCoordinates(new Point(p.x - width, p.y));
        }

        if (p.y < 0) {
            return sanitizeCoordinates(new Point(p.x, p.y + height));
        }

        if (p.y >= height) {
            return sanitizeCoordinates(new Point(p.x, p.y - height));
        }

        return p;
    }