UUID Tracking, and some other minor things
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user