diff options
Diffstat (limited to 'js/matrix.js')
| -rw-r--r-- | js/matrix.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/matrix.js b/js/matrix.js index 0bb2492..fd4ee4f 100644 --- a/js/matrix.js +++ b/js/matrix.js @@ -89,6 +89,14 @@ Matrix.prototype.region = function(w,h,x,y) { return parent.aa[y][x] }) mat.f = this.f + return mat +} +Matrix.prototype.setCell = function(lex,x,y){ + this.aa[y] && this.aa[y][x] && this.aa[y][x].clone(lex) +} +Matrix.prototype.getCell = function(x,y){ + if (this.aa[y] && this.aa[y][x]) return this.aa[y][x] + else return null } Matrix.prototype.ascii = function () { var lines = this.aa.map(function(row, y){ |
