Funky chess board


this working fine i want to know how can i modify it to print maximum traversed path