Skip to content

Instantly share code, notes, and snippets.

@Nick0603
Created August 15, 2017 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nick0603/0292bba1d198dc72362204df756f81d1 to your computer and use it in GitHub Desktop.
Save Nick0603/0292bba1d198dc72362204df756f81d1 to your computer and use it in GitHub Desktop.
var arr= [];
var filterArr= [];
var thresholdNum = 70;
arr.push([250,000,000,000,000,000,000,000]);
arr.push([000,250,000,000,000,000,000,000]);
arr.push([000,000,250,000,000,000,000,000]);
arr.push([000,000,000,250,000,000,000,000]);
arr.push([000,000,000,000,250,000,000,000]);
arr.push([000,000,000,000,000,250,000,000]);
arr.push([000,000,000,000,000,000,250,000]);
arr.push([000,000,000,000,000,000,000,250]);
var filterArr= [];
filterArr.push([000,000,000,000,000,000,000,000]);
filterArr.push([000,000,000,000,000,000,000,000]);
filterArr.push([000,000,000,000,000,000,000,000]);
filterArr.push([000,000,000,000,000,000,000,000]);
filterArr.push([000,000,000,000,000,000,000,000]);
filterArr.push([000,000,000,000,000,000,000,000]);
filterArr.push([000,000,000,000,000,000,000,000]);
filterArr.push([000,000,000,000,000,000,000,000]);
for(var i = 0;i<8;i++){
for(var j = 0;j<8;j++){
if(arr[i][j] > thresholdNum){
filterArr[i][j] = 1;
}else{
filterArr[i][j] = 0;
}
}
}
var filterImg = "";
for(var i = 0;i<8;i++){
for(var j = 0;j<8;j++){
if(filterArr[i][j] == 1){
filterImg = filterImg + "■";
}else{
filterImg = filterImg + "□";
}
}
filterImg = filterImg + "\n"
}
console.log(filterImg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment