private int calcDistance(int targetValue, int initX, int initY, int[][] currentBoard) {
        for ( int x = 0 ; x < currentBoard.length ; x ++ ) {
            for ( int y = 0 ; y < currentBoard[0].length ; y ++ ) {
                int currentValue = currentBoard[x][y];
                boolean isMatched = currentValue == targetValue;
                if ( isMatched ) {
                    return Math.abs( x - initX ) + Math.abs( y - initY );
                }
            }
        }

        throw new RuntimeException("値が見つかりませんでした: value=" + targetValue + ", board=" + Arrays.toString(currentBoard));
    }