Skip to content

Commit

Permalink
Fix return value in load function and add
Browse files Browse the repository at this point in the history
logLineCount variable in mainGameLoop
  • Loading branch information
Niceygy committed Nov 9, 2023
1 parent 14f8041 commit 17f1450
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion game.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def load(logDir):
except json.JSONDecodeError:
log(f"Skipping line: {line}", "load")
res.reverse() # so that it will stop when at the latest event it recognizes
return res
return res, len(res)


def getCMDR(logs):
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def mainGameLoop():
j = 0
while j < len(logs):
logLineNow = logs[j]
now = eventHandler(logLineNow["event"], j)
now, logLineCount = eventHandler(logLineNow["event"], j)
log("Event: " + str(now) + " No: " + str(j), "mainGameLoop")
j += 1
if now != 1:
Expand Down

0 comments on commit 17f1450

Please sign in to comment.