Not sure why I'm getting this... found my mistake
Update:\nFirst move of rotating is not allowed becasue (1,1) is not empty.  I didn\'t read the rotation carefully.\n\n---\nMy program says that the sname makes 
Update:\nFirst move of rotating is not allowed becasue (1,1) is not empty.  I didn\'t read the rotation carefully.\n\n---\nMy program says that the sname makes it to the end in 29 moves but the answer is -1.  When I tried check it out visual, it makes sense that the snake can make it to the end.  Could anyone help me with this test case? \n```\n[[0,0,1,0,0,0,0,0,0,0,0,0,0,0,0],\n [0,1,0,1,1,0,0,1,0,0,0,0,1,0,0],\n [0,1,0,0,0,0,1,0,0,1,0,0,0,0,0],\n [0,0,0,0,0,0,1,0,0,0,0,0,0,0,0],\n [0,0,0,0,0,0,1,1,0,0,0,0,0,0,0],\n [0,0,0,0,0,0,0,0,0,1,0,1,0,0,0],\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\n [0,0,0,1,0,1,0,0,1,0,0,0,1,0,0],\n [0,0,0,0,1,0,0,0,0,0,0,0,0,1,0],\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\n [0,0,0,1,0,0,0,0,0,0,0,0,0,0,0],\n [1,0,1,1,0,0,0,0,0,0,0,0,0,0,0],\n [0,0,0,0,0,0,0,0,0,0,0,0,0,1,0],\n [1,0,0,0,0,0,1,0,0,0,1,0,0,0,1],\n [0,0,1,0,1,0,0,0,0,0,0,0,0,0,0]]\n \n```\n\nI\'ve attached my BFS search:\n```\n0\n[0, 0, 0, 1]\n1\n[0, 0, 1, 0]\n2\n[1, 0, 2, 0]\n3\n[2, 0, 3, 0]\n4\n[3, 0, 4, 0]\n5\n[3, 1, 4, 1]\n[4, 0, 5, 0]\n[3, 0, 3, 1]\n6\n[3, 2, 4, 2]\n[4, 1, 5, 1]\n[3, 1, 3, 2]\n[5, 0, 6, 0]\n[4, 0, 4, 1]\n7\n[3, 3, 4, 3]\n[4, 2, 5, 2]\n[3, 2, 3, 3]\n[5, 1, 6, 1]\n[4, 1, 4, 2]\n[6, 0, 7, 0]\n[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8, 6, 9]\n[9, 6, 10, 6]\n[8, 6, 8, 7]\n[9, 5, 9, 6]\n[10, 4, 10, 5]\n[9, 4, 10, 4]\n[12, 3, 13, 3]\n[12, 2, 12, 3]\n[13, 1, 13, 2]\n17\n[8, 8, 9, 8]\n[9, 7, 10, 7]\n[8, 7, 8, 8]\n[6, 9, 6, 10]\n[10, 6, 11, 6]\n[9, 6, 9, 7]\n[10, 5, 10, 6]\n[9, 5, 10, 5]\n[11, 4, 11, 5]\n[10, 4, 11, 4]\n[12, 4, 13, 4]\n[13, 3, 14, 3]\n[12, 3, 12, 4]\n[13, 2, 13, 3]\n18\n[8, 9, 9, 9]\n[9, 8, 10, 8]\n[8, 8, 8, 9]\n[10, 7, 11, 7]\n[9, 7, 9, 8]\n[6, 10, 6, 11]\n[7, 9, 7, 10]\n[6, 9, 7, 9]\n[11, 6, 12, 6]\n[10, 6, 10, 7]\n[11, 5, 11, 6]\n[10, 5, 11, 5]\n[12, 4, 12, 5]\n[11, 4, 12, 4]\n[12, 5, 13, 5]\n[13, 3, 13, 4]\n19\n[8, 10, 9, 10]\n[9, 9, 10, 9]\n[8, 9, 8, 10]\n[10, 8, 11, 8]\n[9, 8, 9, 9]\n[11, 7, 12, 7]\n[10, 7, 10, 8]\n[6, 11, 6, 12]\n[7, 10, 7, 11]\n[6, 10, 7, 10]\n[7, 9, 8, 9]\n[11, 6, 11, 7]\n[12, 5, 12, 6]\n[11, 5, 12, 5]\n[13, 4, 13, 5]\n[13, 5, 14, 5]\n20\n[8, 11, 9, 11]\n[9, 10, 10, 10]\n[8, 10, 8, 11]\n[10, 9, 11, 9]\n[9, 9, 9, 10]\n[11, 8, 12, 8]\n[10, 8, 10, 9]\n[12, 7, 13, 7]\n[11, 7, 11, 8]\n[6, 12, 6, 13]\n[6, 11, 7, 11]\n[7, 10, 8, 10]\n[12, 6, 12, 7]\n21\n[8, 12, 9, 12]\n[9, 11, 10, 11]\n[8, 11, 8, 12]\n[10, 10, 11, 10]\n[9, 10, 9, 11]\n[11, 9, 12, 9]\n[10, 9, 10, 10]\n[12, 8, 13, 8]\n[11, 8, 11, 9]\n[13, 7, 14, 7]\n[12, 7, 12, 8]\n[6, 13, 6, 14]\n[7, 11, 8, 11]\n22\n[9, 12, 10, 12]\n[10, 11, 11, 11]\n[9, 11, 9, 12]\n[11, 10, 12, 10]\n[10, 10, 10, 11]\n[12, 9, 13, 9]\n[11, 9, 11, 10]\n[13, 8, 14, 8]\n[12, 8, 12, 9]\n[13, 7, 13, 8]\n[7, 13, 7, 14]\n[6, 13, 7, 13]\n23\n[9, 13, 10, 13]\n[10, 12, 11, 12]\n[9, 12, 9, 13]\n[11, 11, 12, 11]\n[10, 11, 10, 12]\n[11, 10, 11, 11]\n[13, 9, 14, 9]\n[12, 9, 12, 10]\n[13, 8, 13, 9]\n[14, 7, 14, 8]\n[6, 14, 7, 14]\n24\n[9, 14, 10, 14]\n[10, 13, 11, 13]\n[9, 13, 9, 14]\n[11, 12, 12, 12]\n[10, 12, 10, 13]\n[12, 11, 13, 11]\n[11, 11, 11, 12]\n[12, 10, 12, 11]\n[14, 8, 14, 9]\n[7, 14, 8, 14]\n25\n[10, 14, 11, 14]\n[10, 13, 10, 14]\n[12, 12, 13, 12]\n[11, 12, 11, 13]\n[13, 11, 14, 11]\n[12, 11, 12, 12]\n[14, 9, 14, 10]\n[8, 14, 9, 14]\n26\n[11, 14, 12, 14]\n[11, 13, 11, 14]\n[13, 12, 14, 12]\n[13, 11, 13, 12]\n[14, 10, 14, 11]\n27\n[13, 13, 14, 13]\n[13, 12, 13, 13]\n[14, 11, 14, 12]\n28\n[14, 12, 14, 13]\n29\n[14, 13, 14, 14]\n29\n```
[]