diff --git a/othello/moderator/jailed_runners.py b/othello/moderator/jailed_runners.py index cb46d564..dbd7274f 100644 --- a/othello/moderator/jailed_runners.py +++ b/othello/moderator/jailed_runners.py @@ -38,7 +38,7 @@ def get_move(self, board: str, player: str, time_limit: int) -> Union[Tuple[int, try: board = "".join(board) if self.board_10x10: - board = "?" * 11 + "??".join(board[i : i + 8] for i in range(0, 64, 8)) + "?" * 11 + board = "?" * 11 + "??".join(board[i: i + 8] for i in range(0, 64, 8)) + "?" * 11 args = (board, player, best_move, is_running) if self.nargs == 4 else (board, player, best_move, is_running, time_limit) p = mp.Process( target=self.play_wrapper, diff --git a/othello/moderator/runners.py b/othello/moderator/runners.py index 32c3f4b4..66187b7a 100644 --- a/othello/moderator/runners.py +++ b/othello/moderator/runners.py @@ -19,7 +19,7 @@ def convert_to_10x10(board: str) -> str: - return "?" * 11 + "??".join(board[i : i + 8] for i in range(0, 64, 8)) + "?" * 11 + return "?" * 11 + "??".join(board[i: i + 8] for i in range(0, 64, 8)) + "?" * 11 def convert_to_legacy(board: str) -> str: @@ -84,7 +84,7 @@ def stop(self): @capture_generator_value def get_move( self, board: str, player: Player, time_limit: int, last_move: Move - ) -> Generator[str, None, Union[Tuple[int, int, int], Tuple[int, ServerError, int], Tuple[int, UserError, int]],]: + ) -> Generator[str, None, Union[Tuple[int, int, int], Tuple[int, ServerError, int], Tuple[int, UserError, int]], ]: if self.process.poll(): print(self.process.communicate()) return -1, ServerError.PROCESS_EXITED, -1 @@ -144,7 +144,7 @@ def stop(self): @capture_generator_value def get_move( self, board: str, player: Player, time_limit: int, last_move: Move - ) -> Generator[str, None, Union[Tuple[int, int, int], Tuple[int, ServerError, int], Tuple[int, UserError, int]],]: + ) -> Generator[str, None, Union[Tuple[int, int, int], Tuple[int, ServerError, int], Tuple[int, UserError, int]], ]: yield "Choose your move!" start = time.time() while True: