Merge 5dbdea4de1
into 85b4d671c4
This commit is contained in:
commit
19d3d5a969
5
bot.py
5
bot.py
|
@ -245,6 +245,8 @@ def kick_player(bot, update):
|
|||
|
||||
if update.message.reply_to_message:
|
||||
kicked = update.message.reply_to_message.from_user
|
||||
if kicked.id == bot.id:
|
||||
kicked = game.current_player.user
|
||||
|
||||
try:
|
||||
gm.leave_game(kicked, chat)
|
||||
|
@ -266,7 +268,8 @@ def kick_player(bot, update):
|
|||
|
||||
else:
|
||||
send_async(bot, chat.id,
|
||||
text=_("Please reply to the person you want to kick and type /kick again."),
|
||||
text=_("Please reply to the person you want to kick and type /kick again. "
|
||||
"Note that replying to the bot causes the current player to be kicked."),
|
||||
reply_to_message_id=update.message.message_id)
|
||||
return
|
||||
|
||||
|
|
5
game.py
5
game.py
|
@ -22,6 +22,8 @@ import logging
|
|||
from config import ADMIN_LIST, OPEN_LOBBY, DEFAULT_GAMEMODE, ENABLE_TRANSLATIONS
|
||||
from datetime import datetime
|
||||
|
||||
from random import choice as rand_choice
|
||||
|
||||
from deck import Deck
|
||||
import card as c
|
||||
|
||||
|
@ -69,6 +71,9 @@ class Game(object):
|
|||
else:
|
||||
self.deck._fill_wild_()
|
||||
|
||||
# randomize the first player
|
||||
self.current_player = rand_choice(self.players)
|
||||
|
||||
self._first_card_()
|
||||
self.started = True
|
||||
|
||||
|
|
Loading…
Reference in a new issue