diff options
Diffstat (limited to 'swiftstory/Player.py')
-rw-r--r-- | swiftstory/Player.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/swiftstory/Player.py b/swiftstory/Player.py index cc64d17..a1d6cda 100644 --- a/swiftstory/Player.py +++ b/swiftstory/Player.py @@ -22,9 +22,9 @@ class Player(): def set_has_played(self, has=True): self.has_played = has - def inc_score(self): + async def inc_score(self): self.score += 1 - self.send_notification({ + await self.send_notification({ 'op': 'updated_score', 'content': self.score, }) @@ -34,10 +34,10 @@ class Player(): self.next_idx += 1 return self.next_idx - 1 - def send_notification(self, obj): + async def send_notification(self, obj): if self.client is None: return message = json.dumps({'type': 'notification', 'content': obj}) - self.client.send_notification(message) + await self.client.send_notification(message) |