Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary check from claimdraw #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove unnecessary check from claimdraw
  • Loading branch information
vesatoivonen committed Feb 1, 2018
commit b6f323a14514b74de322a972d8b668ce2feac160
2 changes: 0 additions & 2 deletions tgchessbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ def on_chat_message(self, msg):
bot.sendMessage(chat_id, "There is no chess matches going on.")
elif not self.is_in_game(players, sender_id):
bot.sendMessage(chat_id, "You are not involved in the chess match.")
elif match.get_turn_id() != sender_id:
bot.sendMessage(chat_id, "It's not your turn.")
elif match.board.can_claim_draw() or match.drawoffer == match.get_opp_id(sender_id):
self.game_end(chat_id, players, "Draw")
else:
Expand Down