Repl taking forever to run

Question: My Repl is taking super long to run. I am an explorer.

Repl link/Link to where the bug appears: https://replit.com/@element1010/Pyrelocke

Screenshots, links, or other helpful context:

from replit import db
from toml import loads

db["place"] = db.get("place", "starstone-castle")
db["hp"] = db.get("hp", 100)
db["maxhp"] = db.get("maxhp", 100)
db["str"] = db.get("str", 1)
db["mag"] = db.get("mag", 50)
db["lvl"] = db.get("lvl", 1)
db["spells"] = []
db["inv"] = []
db["gold"] = 0
db["weapon"] = None
db["shield"] = None
db["staff"] = None

data = {}
items = {}
mobs = {}

place = db["place"]
hp = db["hp"]
maxhp = db["maxhp"]
str = db["str"]

with open("data.toml") as file:
  data = loads(file.read())

items = data["items"]
mobs = data["mobs"]

def printChoices(choices):
  choice_str = "|"
  for choice in choices:
    choice_str += f" {choice} |"
  print(choice_str)

def battle(mob):
  global hp

  ehp = mobs[mob]["hp"]
  estr = mobs[mob]["str"]

  while True:
    pass

# Places
def pyrelocke_village():
  pass

while True: # main game loop
  match place:
    case "pyrelocke-village":
      pyrelocke_village()

Nvm, solved, it was because the while True loop at the end wasn’t matching anything.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.