This commit is contained in:
spla 2020-12-03 19:20:48 +01:00
pare a5dc281cea
commit 27bc472be5

Veure arxiu

@ -681,7 +681,7 @@ def send_anotation(game_id):
return (emailed, game_id, game_found)
def close_game(username):
def close_game(username, checkmate):
try:
@ -729,6 +729,10 @@ def close_game(username):
winner = 'none'
if checkmate:
winner = username
else:
if query_word == search_end and username == white_user and stalemate == False:
@ -1592,12 +1596,12 @@ if __name__ == '__main__':
game_moves = board.ply()
close_game(username)
if stalemate == False:
checkmate = True
close_game(username, checkmate)
else:
checkmate = False
@ -1718,6 +1722,8 @@ if __name__ == '__main__':
stalemate = False
checkmate = False
if black_user != '':
if username == white_user:
@ -1726,7 +1732,7 @@ if __name__ == '__main__':
mastodon.status_post(toot_text, in_reply_to_id=status_id,visibility=visibility)
close_game(username)
close_game(username, checkmate)
update_replies(status_id, username, now)
@ -1740,7 +1746,7 @@ if __name__ == '__main__':
mastodon.status_post(toot_text, in_reply_to_id=status_id,visibility=visibility)
close_game(username)
close_game(username, checkmate)
update_replies(status_id, username, now)
@ -1754,7 +1760,7 @@ if __name__ == '__main__':
mastodon.status_post(toot_text, in_reply_to_id=status_id, visibility=visibility)
close_game(username)
close_game(username, checkmate)
update_replies(status_id, username, now)