From 1b1b5331ea662af0510fb062ff6a3f104d0fd881 Mon Sep 17 00:00:00 2001 From: Mike Mueller Date: Wed, 4 Apr 2012 00:21:03 -0700 Subject: [PATCH] Inform late joiners of time left. When you join late, you find out exactly how many seconds you have left in the game. --- plugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin.py b/plugin.py index 41c0f6a..5dcd515 100644 --- a/plugin.py +++ b/plugin.py @@ -478,6 +478,10 @@ class Worddle(BaseGame): ignore=[nick]) if self.state == Worddle.State.ACTIVE: self._display_board(nick) + time_left = int(round(self.end_time - time.time())) + self.announce_to(nick, + "%sLet's GO!%s You have %s%d%s seconds!" % + (WHITE, LGRAY, LYELLOW, time_left, LGRAY), now=True) else: self.announce_to(nick, 'Current Players: %s%s' % (WHITE, (LGRAY + ', ' + WHITE).join(self.players)))