diff --git a/return_to_ship.py b/return_to_ship.py index b7c196a..bd0990d 100644 --- a/return_to_ship.py +++ b/return_to_ship.py @@ -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()