From 25fcabba724e6b945c7159d44eb14e3a7a8431f5 Mon Sep 17 00:00:00 2001 From: overflowerror Date: Mon, 17 Mar 2014 20:55:26 +0100 Subject: [PATCH] trivial, but now we have it. ^^ --- code.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 code.js diff --git a/code.js b/code.js new file mode 100644 index 0000000..78a6cb6 --- /dev/null +++ b/code.js @@ -0,0 +1,7 @@ +var code = new Array(); + +var fuzzyRadius = 5; + +var checkCode = function(num, value) { + return (Math.abs(code[num] - value) < fuzzyRadius); +}