You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
module.exports = {
|
|
generate: function(w, h) {
|
|
var values = {};
|
|
var rand;
|
|
|
|
for (var i = 0; i < w; i++) {
|
|
for (var j = 0; j < h; j++) {
|
|
rand = Math.ceil(Math.random() * 10);
|
|
values[i + '-' + j] = [rand, (rand % 2 === 0)];
|
|
}
|
|
}
|
|
|
|
return values;
|
|
}
|
|
};
|
|
|