Testing
Before solving a maze with the AI player, it's good idea to check if your code works.
Go to http://127.0.0.1:8000/docs.
(Your port might be different,
check with the terminal output when you started the application)Run each of the
/test/...and
make sure the responses are JSON objects with"error": false.
If any of the test returns a response with
"error": true, check the corresponding method in thePlayerclass.test method /test/initialise/{player_name}__init__/test/reset_playerreset/test/set_mazeset_maze/test/next_nodenext_node/test/node_stateset_node_state/test/search_treeget_search_treeFor errors, go to the terminal in which you executed
uvicorn main:app --reloadand check the logs.If there is no error, or all errors are cleared, you can go ahead to the next step - solving the maze with your AI player.