summaryrefslogtreecommitdiffstats
path: root/alcogotchi-server/alcogotchi.py
diff options
context:
space:
mode:
authorLeightonGinty <lxg184@student.bham.ac.uk>2024-11-17 11:46:27 +0000
committerLeightonGinty <lxg184@student.bham.ac.uk>2024-11-17 11:46:27 +0000
commitc4277995d06d5f68db221bf3ff611cf1dd6f4068 (patch)
treef66aced461f957c22e5d8ba5ff0bc1183dc49158 /alcogotchi-server/alcogotchi.py
parent0a3e1e2cf33262ab33551e8f14d11fdb3e5cd615 (diff)
parent2655a2cda2988e63cd03f886f1510fff4abcdd3c (diff)
Merge remote-tracking branch 'origin/master'
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()