def _get_forward_map_pos(self) -> tuple: """前方のmap座標を取得 """ cx, cy = Chip.get_center(self.x, self.y) h = Chip.IMG_HEIGHT w = Chip.IMGBANK_WIDTH if self.direction == "N": cy -= h elif self.direction == "E": cx += w elif self.direction == "W": cx -= w + 1 # TODO: 統一的に書いてほしい else: cy += h (i, j) = Map.to_map(cx, cy) return (i, j)