from game_master import GameMaster import os import cv2 img_dir = '../image' gm = GameMaster(os.path.join(img_dir, 'board.png')) gm.load_image(img_dir) str = "1A" ret = (int(str[0]) - 1) * 4 for i in range(0, len(str)): print(str[i] - 'A')
finally: self.mutex_lock.release() except asyncio.CancelledError: raise def reset(self): self.gm.game_reset() if self.scheduled_task is not None: self.scheduled_task.cancel() self.scheduled_task = None # init img_dir = '../image' bot = GameMaster(os.path.join(img_dir, 'board.png')) bot.load_image(img_dir) mtgm = MultiThreadGameMaster(gm=bot) token = read_token() active_channel_id = read_active_channel_id() lock = asyncio.Lock() # bot を終了するコマンド async def run_quit(message): await message.channel.send('botを終了しました。') sys.exit() def get_cmd_list(): return """ 答え方: A2 C4 みたいに