Log victory in lab

This commit is contained in:
Chris Proctor 2023-07-13 08:55:07 -04:00
parent c15823199d
commit d83291a0b3
1 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,7 @@ from datetime import timedelta
from fancy_printing import print_fancy
CHEST_TIMER_FILE = "adventure/seafloor/coral_reef/.timer"
LOG_FILE = ".log"
BEGINNING = [
"Your adventure has only just begun. You are not yet ready to return to the ship. More secrets await you in the ocean's depths. Use `ls` to look around, and use `cd adventure` to start the adventure..."
]
@ -35,6 +36,8 @@ def reset():
def win():
print_fancy(VICTORY)
win_time = datetime.now().isoformat()
Path(LOG_FILE).write_text(f"finished the lab at {win_time}\n")
def chest_was_opened():
return Path(CHEST_TIMER_FILE).exists()