How to Fix RecursionError in Circular Board Game Solver in Python

visit shbcf.ru