Refactoring: rename arrMap to dim2Map.
--- a/board.js Thu Jul 02 01:06:48 2015 +0300
+++ b/board.js Thu Jul 02 01:43:15 2015 +0300
@@ -915,14 +915,14 @@
ca: 0, cb: 0, cc: 0, cd: 0,
da: 0, db: 0, dc: 0, dd: 0 };
}
-BoardObj.arrMap = [["aa", "ab", "ac", "ad"], ["ba", "bb", "bc", "bd"], ["ca", "cb", "cc", "cd"], ["da", "db", "dc", "dd"]];
+BoardObj.dim2Map = [["aa", "ab", "ac", "ad"], ["ba", "bb", "bc", "bd"], ["ca", "cb", "cc", "cd"], ["da", "db", "dc", "dd"]];
/** Get [i][j] element. */
BoardObj.prototype.get = function(i, j) {
- return this.brd[BoardObj.arrMap[i][j]];
+ return this.brd[BoardObj.dim2Map[i][j]];
}
/** Set [i][j] element. */
BoardObj.prototype.set = function(i, j, val) {
- this.brd[BoardObj.arrMap[i][j]] = val;
+ this.brd[BoardObj.dim2Map[i][j]] = val;
}
/* Return and optionally fill 2d board.
* Doesn't designed to be efficient. */