V
VK
While trying to port the promised Shannon's Clairvoyant code to
Javascript, I am having real troubles to figure out what that would be
in Javascript: 5-dimensional array of 72 elements
In VBA it is as simple as:
Dim Moves(0 To 1, 0 To 2, 0 To 1, 0 To 2, 0 To 1) As Integer
but I am really lost in trying to visualize it so to create an
adequate structure . So far I am using the fact of simple object
augmentation in Javascript so doing like
var Moves = new Object;
// ...
if (typeof Moves['01001'] == 'undefined') {
Moves['01001'] = 1;
}
else {
++Moves['01001'];
}
Sorry if the question is not clear enough, I can explain deeper.
Javascript, I am having real troubles to figure out what that would be
in Javascript: 5-dimensional array of 72 elements
In VBA it is as simple as:
Dim Moves(0 To 1, 0 To 2, 0 To 1, 0 To 2, 0 To 1) As Integer
but I am really lost in trying to visualize it so to create an
adequate structure . So far I am using the fact of simple object
augmentation in Javascript so doing like
var Moves = new Object;
// ...
if (typeof Moves['01001'] == 'undefined') {
Moves['01001'] = 1;
}
else {
++Moves['01001'];
}
Sorry if the question is not clear enough, I can explain deeper.