From 5912a13ccb48313da191741931409a11b217d306 Mon Sep 17 00:00:00 2001
From: Holden Rohrer
Date: Sat, 22 Feb 2020 22:56:41 +0000
Subject: removed global variable pollution
---
space.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'space.js')
diff --git a/space.js b/space.js
index d7f68e8..57df25f 100644
--- a/space.js
+++ b/space.js
@@ -39,7 +39,7 @@ function Space(){
let cont = chop(tile.content,16);
let read = 0; //line of cont to read
for (let line=0; line<8; line++){
- curline = line+8*tilerow;
+ let curline = line+8*tilerow;
if (conform && incl.includes(line)){
for (let i=0; i<16; i++) this.data[curline].push(' ');
} else {
@@ -85,6 +85,7 @@ function Space(){
this.comb = function(other, func){ // other must have a valid .loc. If this.loc null, treated as offset
if (! other.loc) throw "The secondary space must have a valid .loc"
+ let offset;
if (this.loc.length == 0) {
offset = [0, 0];
this.loc = other.loc;
--
cgit