@Override
    public Object solve() {
        int max = 0;
        for (int i = 0; i < 20; i++) {
            for (int j = 0; j < 20; j++) {
                for (Direction d : Direction.values()) {
                    if (isAValidDirection(d, i, j)) {
                        int val = calculateProduct(d, i, j);
                        if (val > max) {
                            max = val;
                        }
                    }
                }
            }
        }
        return max;
    }