Fix connect 4 edit if not found
This commit is contained in:
@@ -111,7 +111,7 @@ class Connect4Bot(MultiBot, ABC):
|
|||||||
if await self._check_game_finished(i, j, player_1, player_2, next_turn, board, message):
|
if await self._check_game_finished(i, j, player_1, player_2, next_turn, board, message):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
await self.edit(
|
return not await self.edit(
|
||||||
Media(
|
Media(
|
||||||
connect_4_frontend.make_image(board, next_player, highlight=(i, j)),
|
connect_4_frontend.make_image(board, next_player, highlight=(i, j)),
|
||||||
MediaType.IMAGE,
|
MediaType.IMAGE,
|
||||||
@@ -120,7 +120,6 @@ class Connect4Bot(MultiBot, ABC):
|
|||||||
),
|
),
|
||||||
message
|
message
|
||||||
)
|
)
|
||||||
return False
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _available_positions(board: list[list[int | None]]) -> list[tuple[int, int]]:
|
def _available_positions(board: list[list[int | None]]) -> list[tuple[int, int]]:
|
||||||
|
|||||||
Reference in New Issue
Block a user