|
@@ -707,10 +707,14 @@ async def chess_from_handler(chess, id, moves):
|
|
|
|
|
|
|
|
|
async def chess_stop_handler(chess, id):
|
|
|
- if await chess.end(id):
|
|
|
- return ["Игра завершена."]
|
|
|
+ try:
|
|
|
+ stats = chess_game_stats(chess, id)
|
|
|
+ except KeyError:
|
|
|
+ return ["Нет активной игры."]
|
|
|
+
|
|
|
+ await chess.end(id)
|
|
|
|
|
|
- return ["Нет активной игры."]
|
|
|
+ return ["Игра завершена.", stats]
|
|
|
|
|
|
|
|
|
async def chess_move_handler(chess, id, move):
|