You may have already outgrown the TIO platform, it's all about code golfing!
For comparing the output, you'll want to look into networkx.
(Also, you can shorten your links here by filling in the Text field in Link -> Insert Link.)
the reason i used tio is because thats the only way i could send it, but also look i made an html js game, its called maze game, and the repo for the entire project of the parser and runner for my version is in here