Fix connect 4 edit if not found

This commit is contained in:
AlberLC
2022-11-26 02:03:50 +01:00
parent fce458d5ed
commit 8f395d3406

View File

@@ -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]]: