Python Straight BFS Solution | Easy to Understand
Approach\n Describe your approach to solving the problem. \nJust have right, down, clockwise and counter-clockwise as directions in the direction array and run 
# Approach\n<!-- Describe your approach to solving the problem. -->\nJust have right, down, clockwise and counter-clockwise as directions in the direction array and run a BFS\n\n# Code\n```\nclass Solution:\n    def minimumMoves(self, grid: List[List[int]]) -> int:\n        side, queue = len(grid), deque([[(0, 0), (0, 1), 0]])\n        visited = {((0, 0), (0, 1))}\n        directions = [[(0, 1), (0, 1)], [(1, 0), (1, 0)], \n                      [(0, 0), (1, -1)], [(0, 0), (-1, 1)]]\n\n        def validate(row1: int, col1: int, row2: int, col2: int, dirIndex: int) -> bool:\n            if not (0 <= row1 < side and 0 <= col1 < side and 0 <= row2 < side and 0 <= col2 < side):\n                return False\n            if grid[row1][col1] != 0 or grid[row2][col2] != 0:\n                return False\n            if dirIndex >= 2:  # Edge Case 1\n                if grid[row1 + 1][col1 + 1] == 1:\n                    return False\n            return True\n        \n        while queue:\n            (row1, col1), (row2, col2), step = queue.popleft()\n            if row1 == side - 1 and col1 == side - 2 and row2 == side - 1 and col2 == side - 1:\n                return step\n            for dirIndex in range(len(directions)):\n                if dirIndex == 2:\n                    if row1 != row2:\n                        continue\n                if dirIndex == 3:\n                    if col1 != col2:\n                        continue\n                (drow1, dcol1), (drow2, dcol2) = directions[dirIndex]\n                newRow1, newCol1 = row1 + drow1, col1 + dcol1\n                newRow2, newCol2 = row2 + drow2, col2 + dcol2\n                if validate(newRow1, newCol1, newRow2, newCol2, dirIndex) and ((newRow1, newCol1), (newRow2, newCol2)) not in visited:\n                    visited.add(((newRow1, newCol1), (newRow2, newCol2)))\n                    queue.append(((newRow1, newCol1), (newRow2, newCol2), step + 1))\n        return -1\n```
['Array', 'Breadth-First Search', 'Matrix', 'Python', 'Python3']