Created
August 15, 2017 03:12
-
-
Save Nick0603/0292bba1d198dc72362204df756f81d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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