Skip to content

Commit

Permalink
fixed a few bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
extra-special-mature-cheddar-cheese committed Aug 31, 2021
1 parent 721ecab commit 4ec056f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def __init__(self):
self.temp2 = []
self.temp3 = []
self.cellmatrix = []
self.celllocs = []
self.levelwidth = 0
self.levelheight = 0

Expand Down Expand Up @@ -116,8 +117,6 @@ def mapfunc(a,b):
passed = 0
while not stop:
current = code[index]
if debug:
print(current)
if current == ";":
passed += 1
if passed == 4:
Expand All @@ -132,8 +131,6 @@ def mapfunc(a,b):
currentcell = ""
while True:
current = code[index]
if debug:
print(current)
index += 1
if current == "," or current == ";":
break
Expand All @@ -146,7 +143,7 @@ def mapfunc(a,b):
if current == ";":
stop = True
else:
index += 1
pass

if debug:
print()
Expand Down Expand Up @@ -217,8 +214,8 @@ def mapfunc(a,b):
print(loc)
print("\n\n")
self.temp3.append(loc)
self.cellmatrix = list(map(mapfunc,self.cellmatrix,self.temp3))
self.temp2 = self.temp3 = []
self.celllocs = self.temp3.copy()
self.temp2 = self.temp3 = []



Expand All @@ -232,6 +229,7 @@ def mapfunc(a,b):
width: {decoder.levelwidth}
height: {decoder.levelheight}
matrix: {decoder.cellmatrix}
celllocs: {decoder.celllocs}
temp2: {decoder.temp2}
temp3: {decoder.temp3}
""")
Expand Down

0 comments on commit 4ec056f

Please sign in to comment.