moar commands, leave always, asynchronous sending, game switching [untested]

This commit is contained in:
Jannes Höke
2016-04-26 17:53:29 +02:00
parent c1ef321cc3
commit 67daa82ece
4 changed files with 192 additions and 82 deletions

View File

@ -27,8 +27,9 @@ class Player(object):
self._next = self
self._prev = self
game.current_player = self
game.owner = self
for i in range(7):
for i in range(2):
self.cards.append(self.game.deck.draw())
self.bluffing = False
@ -37,6 +38,9 @@ class Player(object):
def leave(self):
""" Leave the current game """
if self.next is self:
return
self.next.prev = self.prev
self.prev.next = self.next
self.next = None