✨
This commit is contained in:
@ -108,7 +108,7 @@ class ConnectFour(BoardGame):
|
||||
await self.bot.defer(ctx)
|
||||
channel = str(ctx.channel_id)
|
||||
|
||||
opponent_info = await self._test_opponent(ctx, opponent)
|
||||
opponent, opponent_info = await self._test_opponent(ctx, opponent)
|
||||
if not opponent_info:
|
||||
return
|
||||
|
||||
@ -119,7 +119,7 @@ class ConnectFour(BoardGame):
|
||||
players = [ctx.author.id, opponent]
|
||||
random.shuffle(players)
|
||||
|
||||
self.draw.draw_image(channel, board, players, [0, [0,0], ""], players)
|
||||
self.draw.draw_image(channel, board, players, [0, [0,0], ""])
|
||||
|
||||
opponent_name = self.get_name(f"#{opponent}")
|
||||
turn_name = self.get_name(f"#{players[0]}")
|
||||
@ -252,7 +252,11 @@ class ConnectFour(BoardGame):
|
||||
if placed_piece:
|
||||
channel = str(ctx.channel)
|
||||
self.draw.draw_image(
|
||||
channel, board, winner, win_coordinates, win_direction, players)
|
||||
channel,
|
||||
board,
|
||||
players,
|
||||
[winner, win_coordinates, win_direction]
|
||||
)
|
||||
|
||||
|
||||
boards_path = "gwendolyn/resources/games/connect_four_boards/"
|
||||
|
@ -189,7 +189,7 @@ class BoardGame(GameBase):
|
||||
self.bot.log("They tried to play against themself")
|
||||
return False
|
||||
|
||||
return difficulty, difficulty_text
|
||||
return opponent, (difficulty, difficulty_text)
|
||||
|
||||
class BaseDrawer():
|
||||
"""Class for drawing games."""
|
||||
|
@ -632,7 +632,7 @@ class DrawHangman():
|
||||
|
||||
random.seed(game_id)
|
||||
|
||||
background = Image.open("gwendolyn/resources/paper.jpg")
|
||||
background = Image.open("gwendolyn/resources/games/default_images/hangman.png")
|
||||
gallow = self._draw_gallows()
|
||||
man = self._draw_man(misses, game_id)
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
import random # Used in movieFunc
|
||||
import datetime # Used in helloFunc
|
||||
import urllib # Used in imageFunc
|
||||
import random # Used in movie_func
|
||||
import datetime # Used in hello_func
|
||||
import urllib # Used in image_func
|
||||
import ast
|
||||
|
||||
import imdb # Used in movieFunc
|
||||
import discord # Used in movieFunc
|
||||
import lxml # Used in imageFunc
|
||||
import fandom # Used in findWikiPage
|
||||
import d20 # Used in rollDice
|
||||
import imdb # Used in movie_func
|
||||
import discord # Used in movie_func
|
||||
import lxml # Used in image_func
|
||||
import fandom # Used in find_wiki_page
|
||||
import d20 # Used in roll_dice
|
||||
|
||||
from .plex import Plex
|
||||
from .nerd_shit import NerdShit
|
||||
@ -93,7 +93,10 @@ class Other():
|
||||
cam = random.choice(cams)
|
||||
self.bot.log("Chose cam type "+cam)
|
||||
if cam == "one":
|
||||
search = f"img_{''.join([random.randint(0,9) for _ in range(4)])}"
|
||||
|
||||
search = "img_" + ''.join(
|
||||
[str(random.randint(0,9)) for _ in range(4)]
|
||||
)
|
||||
elif cam == "two":
|
||||
year = str(random.randint(2012,2016))
|
||||
month = str(random.randint(1,12)).zfill(2)
|
||||
@ -102,7 +105,9 @@ class Other():
|
||||
elif cam == "three":
|
||||
search = f"IMAG_{str(random.randint(1,500)).zfill(4)}"
|
||||
elif cam == "four":
|
||||
search = f"DSC_{''.join([random.randint(0,9) for _ in range(4)])}"
|
||||
search = "DSC_" + ''.join(
|
||||
[str(random.randint(0,9)) for _ in range(4)]
|
||||
)
|
||||
|
||||
self.bot.log("Searching for "+search)
|
||||
|
||||
|
Reference in New Issue
Block a user