diff options
author | 2021-06-04 19:06:39 +0530 | |
---|---|---|
committer | 2021-06-04 19:06:39 +0530 | |
commit | 2e62c7c508c21e66bcf16012a7da3b8c964cc0ef (patch) | |
tree | e24fa7dff6646bec8a3c88c78776ce1c323d689c | |
parent | made changes given by Xith (diff) |
cleaned up dead code
-rw-r--r-- | bot/exts/evergreen/rps.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/bot/exts/evergreen/rps.py b/bot/exts/evergreen/rps.py index c34118f2..13185470 100644 --- a/bot/exts/evergreen/rps.py +++ b/bot/exts/evergreen/rps.py @@ -1,6 +1,5 @@ from random import choice -from discord import Member, TextChannel from discord.ext import commands from bot.bot import Bot @@ -31,35 +30,6 @@ WINNER_DICT = { class RPS(commands.Cog): """Rock Paper Scissor. The Classic Game!""" - async def game_start(self, player: Member, channel: TextChannel, action: str) -> None: - """ - Check action of player, draw a move and return result. - - After checking if action of player is valid, make a random move. - And based on the move, compare moves of both player and bot and send approprite result. - """ - if not action: - await channel.send("Please make a move.") - return - - action = action.lower() - - if action not in CHOICES and action not in SHORT_CHOICES: - await channel.send(f"Invalid move. Please make move from options: {' '.join(CHOICES)}") - return - - bot_move = choice(CHOICES) - # value of player_result will be from (-1, 0, 1) as (lost, tied, won). - player_result = WINNER_DICT[action[0]][bot_move[0]] - - if player_result == 0: - message_string = f"{player.mention} You and Sir Lancebot played {bot_move.upper()}, It's a tie." - await channel.send(message_string) - elif player_result == 1: - await channel.send(f"Sir Lancebot played {bot_move.upper()}! {player.mention} Won!") - else: - await channel.send(f"Sir Lancebot played {bot_move.upper()}! {player.mention} Lost!") - @commands.command(case_insensitive=True) async def rps(self, ctx: commands.Context, move: str) -> None: """Play the classic game of Rock Paper Scissor with your own sir-lancebot!""" |