Depth First Search Algorithm Python Code For Game