Formatting

This commit is contained in:
Matyáš Caras 2022-05-04 10:18:42 +02:00 committed by GitHub
parent 860b98f1a9
commit 362caee205
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -150,13 +150,12 @@ class Game: # the game class keeps information about the loaded game
sleep(5) sleep(5)
self.current = self.nodes[self.current]["actions"][0] # move to the first action self.current = self.nodes[self.current]["actions"][0] # move to the first action
self.print_text() self.print_text()
return
else: else:
# Player defeated # Player defeated
print(self.lang["defeat"].replace("$enemy",enemy["name"])) print(self.lang["defeat"].replace("$enemy",enemy["name"]))
sleep(5) sleep(5)
self.print_text() self.print_text()
return return
else: else:
m = MenuManager(actions_desc,self.parse_colors(self.nodes[self.current]["text"])) m = MenuManager(actions_desc,self.parse_colors(self.nodes[self.current]["text"]))
sel = m.selected sel = m.selected
@ -213,4 +212,4 @@ def load(file_path,lang): # starts to load the game from YAML
except Exception as e: except Exception as e:
print(f"{Back.RED}{Fore.WHITE}ERROR{Fore.RESET}{Back.RESET}") print(f"{Back.RED}{Fore.WHITE}ERROR{Fore.RESET}{Back.RESET}")
print(e) print(e)
return None return None