class GamingSession:
def __init__(self):
self.lastGamingDate = "2023-08-20" // 3 weeks ago from current date
self.daysSinceLastGame = calculateDaysSince(self.lastGamingDate)
def calculateDaysSince(lastDate):
// get the difference in days from current date and lastDate
return daysDifference
class Person:
def __init__(self, name):
self.name = name
self.mood = "neutral"
def updateMood(self, mood):
self.mood = mood
nick = Person("Nick")
orion = Person("Orion")
witek = Person("Witek")
currentGamingSession = GamingSession()
function areTheyGaming(nick, orion, witek, session):
if nick.mood == "depressed":
print("Looks like Nick is already in the gaming void. 😢")
return
if session.daysSinceLastGame >= 21: // 3 weeks or more
print(f"It's been {session.daysSinceLastGame} days since the legendary trio has gamed. This is unacceptable!")
if not (nick.mood == "gaming" and orion.mood == "gaming" and witek.mood == "gaming"):
print("Are Nick, Orion, and Witek gaming? If they aren't, Nick's gonna enter the abyss of despair.")
nick.updateMood("depressed")
print("Nick is now in a state of deep sadness. Quick! Someone set up a game!")
else:
print("Yay! The trio is gaming and keeping the gaming void at bay! 🎮")
else:
print("All's good in the gaming world. Carry on!")