I am trying to implement the knights tour problem on a 3x4 grid display. My grid is displayed as follows:
A B C D
1: 1 - - -
2: - - - -
3: - - - -
The user starts on A1, which is [0][0] on the 2D array. How would I associate my user input with other positions on the grid. For example, if the user was to type A2 (I'm aware this isn't a valid knight move) - how would I let the program know this is position [0][1] on the array (I think)?
Any help would be much appreciated.