Javascript implementation of counting number of possible hexagonal walks
let depth = 14 ; let ways = new Array ( 16 ) ; for ( let i = 0 ; i < 16 ; i ++ ) { ways [ i ] = new Array ( 16 ) ; for ( let j = 0 ; j < 16 ; j ++ ) { ways [ i ] [ j ] = new Array ( 16 ) ; for ( let k = 0 ; k < 16 ; k ++ ) { ways [ i ] [ j ] [ k ] = 0 ; } } } let stepNum ; function preprocess ( list ) {