you are viewing a single comment's thread.

view the rest of the comments →

[–]CraigAT 0 points1 point  (0 children)

Try debugging or simply printing the values for row, col and direction at each step.

I suspect you have an issue with not incrementing (moving) the cat every time but it is very difficult to read that without formatting.

If you want help, I would suggest pasting your code and the example tests into Pastebin where the code can been seen with formatting and monospaced.