From 76b869fce7fff2df6c62b49402aad49b32ac84a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Sat, 30 Apr 2016 13:27:41 +0200 Subject: [PATCH] timelimit on skip command --- game.py | 2 ++ player.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/game.py b/game.py index 80e48ab..8b53fe1 100644 --- a/game.py +++ b/game.py @@ -1,4 +1,5 @@ import logging +from datetime import datetime from deck import Deck import card as c @@ -49,6 +50,7 @@ class Game(object): self.logger.debug("Next Player") self.current_player = self.current_player.next self.current_player.drew = False + self.current_player.turn_started = datetime.now() def play_card(self, card): """ Play a card and trigger its effects """ diff --git a/player.py b/player.py index 2812b84..77da0ef 100644 --- a/player.py +++ b/player.py @@ -1,4 +1,5 @@ import logging +from datetime import datetime import card as c @@ -35,6 +36,7 @@ class Player(object): self.bluffing = False self.drew = False self.anti_cheat = 0 + self.turn_started = datetime.now() def leave(self): """ Leave the current game """