diff options
author | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-18 01:08:45 -0500 |
---|---|---|
committer | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-18 01:08:45 -0500 |
commit | 87bf3307226daa289109b76a604a145121b88fc5 (patch) | |
tree | fb0f455dc7780de3b3cd1150563cf092b220c123 | |
parent | 891700a8db03204459ceeca883d8692b6b82389d (diff) |
more bugfixes
-rw-r--r-- | socket.js | 1 | ||||
-rw-r--r-- | space.js | 7 |
2 files changed, 2 insertions, 6 deletions
@@ -8,7 +8,6 @@ class retryws extends EventEmitter{ // a wrapper on ws that retries on failure let sock; let sockdown = true; this.send = (message) => { - console.log(message); if (sockdown){ throw "Socket is down!"; } @@ -46,11 +46,8 @@ function Space(){ // CLASS } this.towrite = function(charoffset){ // Does no splitting or anything like that. Just returns a list of triplets for the write function let writes = []; - console.log(this.data.length); - for (line = 0; line < this.data.length; line++){ - console.log('boarlocueurgdaoecugd'); - } for (let line = 0; line < this.data.length; line++) for (let chr = 0; chr< this.data[line].length; chr++){ + if (this.data[line][chr] == '') continue; writes.push([[Math.floor( (charoffset[0]+line)/8 ),Math.floor( (charoffset[1]+chr)/16 )],[ (charoffset[0]+line) % 8, (charoffset[1]+chr) % 16 ],this.data[line][chr]]); } return writes; @@ -65,7 +62,7 @@ function Space(){ // CLASS }); } this.adhoc = function(text){ - this.data = text.split('\n').slice(0,-1).map(row => replace(row.replace(/\\(.)/g,'$1'.split(''),'&',''))); + this.data = text.split('\n').map(row => replace( row.replace(/\\(.)/g,'$1').split('') ,'&','' )); } this.comb = function(other, func, offset){ offsety = offset[0]; |