summaryrefslogtreecommitdiffstats
path: root/alcogotchi-server/alcogotchi.py
diff options
context:
space:
mode:
authorGeorge Barrell <78610776+RogerGabeller-ml@users.noreply.github.com>2024-11-17 11:40:05 +0000
committerGitHub <noreply@github.com>2024-11-17 11:40:05 +0000
commit2655a2cda2988e63cd03f886f1510fff4abcdd3c (patch)
treea12cd80b9ef6654adbda67735ab1fba2cec75125 /alcogotchi-server/alcogotchi.py
parent102ba7c9d63301b7fd37908571bb3b32be259f4c (diff)
Update alcogotchi.py
Diffstat (limited to 'alcogotchi-server/alcogotchi.py')
-rw-r--r--alcogotchi-server/alcogotchi.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/alcogotchi-server/alcogotchi.py b/alcogotchi-server/alcogotchi.py
index 7402ff3..06f0fe6 100644
--- a/alcogotchi-server/alcogotchi.py
+++ b/alcogotchi-server/alcogotchi.py
@@ -172,7 +172,7 @@ class Alcogotchi:
def drink(self, data):
global terminated
drink_choice = data["drink"]
- if self.last_drunkentime + 8 < time.time() and self.items[drink_choice] > 0:
+ if self.last_drunkentime + 0 < time.time() and self.items[drink_choice] > 0:
self.drunk += BEVERAGES[drink_choice]
self.happiness += BEVERAGES[drink_choice]
self.last_drunkentime = time.time()
@@ -270,9 +270,13 @@ class Server:
ap = network.WLAN(network.AP_IF)
ap.active(True)
-ap.config(essid="Cool Server1", password="password123")
+ap.config(essid="Your mum", password="password123")
print("Connection avalible on {0}".format(ap.ifconfig()))
+CLUB = "c2:2 c d# c:1 f:2 c:1 f:2 f# g c c g c:1 f#:2 c:1 f#:2 f d# "
+def the_club():
+ buzzer.melody(CLUB)
+
server = Server()
server.add_route("/", alcogotchi.get_alcogotchi)
@@ -281,6 +285,7 @@ server.add_route("/gamble", alcogotchi.double_or_nothing)
server.add_route("/buy", alcogotchi.buy_item)
server.add_route("/drive", alcogotchi.drive)
server.add_route("/mine", alcogotchi.mine)
+server.add_route("/club", the_club)
# _thread.start_new_thread(s, ())
s()
server.start()