Archived
finish hint giving, add better logs
This commit is contained in:
@@ -177,7 +177,7 @@ class Game:
|
||||
|
||||
def log_to_file(self, filename): # raise OSError when file can't be opened
|
||||
"""Log the current game state and logs into a YAML file."""
|
||||
with open(filename, 'w') as f:
|
||||
with open(filename, 'a') as f:
|
||||
yaml.dump(self, f)
|
||||
|
||||
# # # METHODS THAT OUTPUT INTO STDOUT # # #
|
||||
|
||||
@@ -32,4 +32,8 @@ class HintGiver:
|
||||
def is_hint_name(self, level, branch, hint_name):
|
||||
if hint_name in self.hints[level][level+branch]:
|
||||
return True
|
||||
return False
|
||||
return False
|
||||
|
||||
def log_to_file(self, filename):
|
||||
with open(filename, 'a') as f:
|
||||
yaml.dump(self, f)
|
||||
Reference in New Issue
Block a user