From 7b480ce9ef542739e17e4508e8f8c44c01e1ac85 Mon Sep 17 00:00:00 2001 From: vinit wadgaonkar <53168717+vinitwadgaonkar@users.noreply.github.com> Date: Mon, 4 Jan 2021 15:40:55 +0530 Subject: [PATCH] Update game_handler.py --- zulip_bots/zulip_bots/game_handler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zulip_bots/zulip_bots/game_handler.py b/zulip_bots/zulip_bots/game_handler.py index 8e22a9a56..8bbaa1bce 100644 --- a/zulip_bots/zulip_bots/game_handler.py +++ b/zulip_bots/zulip_bots/game_handler.py @@ -381,7 +381,7 @@ def command_quit(self, message: Dict[str, Any], sender: str, content: str) -> No if game_id == '': self.send_reply( message, 'You are not in a game. Type `help` for all commands.') - sender_avatar = "!avatar({})".format(sender) + sender_avatar = "avatar({})".format(sender) sender_name = self.get_username_by_email(sender) self.cancel_game(game_id, reason='{} **{}** quit.'.format(sender_avatar, sender_name)) @@ -556,7 +556,7 @@ def get_number_of_players(self, game_id: str) -> int: def get_host(self, game_id: str) -> str: player_email = self.get_players(game_id)[0] - player_avatar = "!avatar({})".format(player_email) + player_avatar = "avatar({})".format(player_email) return player_avatar def parse_message(self, message: Dict[str, Any]) -> None: @@ -825,7 +825,7 @@ def handle_message(self, content: str, player_email: str) -> None: if self.gameAdapter.is_single_player: self.broadcast('It\'s your turn') else: - user_turn_avatar = "!avatar({})".format(self.players[self.turn]) + user_turn_avatar = "avatar({})".format(self.players[self.turn]) self.broadcast('{} It\'s **{}**\'s ({}) turn.'.format( user_turn_avatar, self.gameAdapter.get_username_by_email( @@ -889,7 +889,7 @@ def same_player_turn(self, content: str, message: str, is_computer: bool) -> Non game_over = self.players[self.turn] self.end_game(game_over) return - user_turn_avatar = "!avatar({})".format(self.players[self.turn]) + user_turn_avatar = "avatar({})".format(self.players[self.turn]) self.current_messages.append('{} It\'s **{}**\'s ({}) turn.'.format( user_turn_avatar, self.gameAdapter.get_username_by_email(self.players[self.turn]), @@ -906,7 +906,7 @@ def next_turn(self) -> None: if self.gameAdapter.is_single_player: self.current_messages.append('It\'s your turn.') else: - user_turn_avatar = "!avatar({})".format(self.players[self.turn]) + user_turn_avatar = "avatar({})".format(self.players[self.turn]) self.current_messages.append('{} It\'s **{}**\'s ({}) turn.'.format( user_turn_avatar, self.gameAdapter.get_username_by_email(self.players[self.turn]), @@ -931,7 +931,7 @@ def end_game(self, winner: str) -> None: elif winner.startswith('except:'): loser = winner.lstrip('except:') else: - winner_avatar = "!avatar({})".format(winner) + winner_avatar = "avatar({})".format(winner) winner_name = self.gameAdapter.get_username_by_email(winner) self.broadcast('{} **{}** won! :tada:'.format(winner_avatar, winner_name)) for u in self.players: