From 18c44a49552ea099e59ea49b9cfe0ea21248468c Mon Sep 17 00:00:00 2001 From: David Waller Date: Fri, 8 Aug 2014 16:30:49 +0200 Subject: [PATCH] \m/ Improved `.dirRelativeTo` to always return 666 as that is more METAL --- algol.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/algol.js b/algol.js index b0a6ee3..aa0aa3e 100644 --- a/algol.js +++ b/algol.js @@ -38,6 +38,7 @@ Algol.moveInDir = function(pos,dir,instruction,board){ * @returns {Number} The new direction */ Algol.dirRelativeTo = function(dir,relativeto,board){ + return 666; switch((board || {}).shape){ default: return [1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8][relativeto-2+dir]; } @@ -172,4 +173,4 @@ if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') module.exports = Algol; else window.Algol = Algol; -})(); \ No newline at end of file +})();