UUID Tracking, and some other minor things

This commit is contained in:
2026-04-27 17:58:30 -04:00
parent 653fcd7034
commit 26ffc55d68
6 changed files with 65 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
import time # first import here!
import uuid
class Cat:
@@ -13,6 +14,7 @@ class Cat:
happiness=100,
sick=False,
depressed=False,
cat_uuid=None,
):
self.name = name
self.traits = traits
@@ -23,6 +25,7 @@ class Cat:
self.happiness = happiness
self.sick = sick
self.depressed = depressed
self.cat_uuid = cat_uuid or str(uuid.uuid4())
def apply_decay(self): # first neat function! yayyy!
elapsed_hours = (time.time() - self.last_login) / 3600