forked from test/mau_mau_bot
tidy up reply_to_query
This commit is contained in:
parent
71ebb72215
commit
d631506d04
1 changed files with 7 additions and 12 deletions
13
bot.py
13
bot.py
|
@ -146,23 +146,18 @@ def reply_to_query(bot, update):
|
|||
if game.choosing_color:
|
||||
add_choose_color(results)
|
||||
else:
|
||||
playable = player.playable_cards()
|
||||
if playable:
|
||||
playable = list(sorted(playable))
|
||||
playable = list(sorted(player.playable_cards()))
|
||||
|
||||
if playable:
|
||||
for card in playable:
|
||||
add_play_card(card, results)
|
||||
|
||||
if playable is not False and not game.choosing_color and not player.drew:
|
||||
if not player.drew:
|
||||
add_draw(player, results, could_play_card=bool(len(playable)))
|
||||
|
||||
if player.drew and not game.choosing_color:
|
||||
else:
|
||||
add_pass(results)
|
||||
|
||||
if game.last_card.special == c.DRAW_FOUR \
|
||||
and not game.choosing_color \
|
||||
and game.draw_counter:
|
||||
if game.last_card.special == c.DRAW_FOUR and game.draw_counter:
|
||||
add_call_bluff(results)
|
||||
|
||||
add_other_cards(playable, player, results)
|
||||
|
|
Loading…
Reference in a new issue