How it worked is easy to describe, somewhat harder to execute.
There was an array, Mathematicians call it a matrix, you might call it a spreadsheet. Basically, a structure of rows, one row per station, and columns, one column per line.
In the array was either a zero or a one (0 or 1), basically for false or true, whether the station was on the line (1) or not (0).
Once two stations were chosen, the program would search all the lines to see if they were both on the same line, then that was a direct route.
But if there was no direct route, the program would find another station that was both of the lines and this would be an interchange. We realised that, within that central area, you would never need two changes.
The program did not find the most efficient route, or take account of closed lines, platforms, train frequency or any other details. It just found a route.
And it really worked well.

It certainly could have been adapted for the extra lines we have now, but this was GCSE and was still a really excellent piece of work.