Skip to content

Instantly share code, notes, and snippets.

@manvillej
Created November 13, 2018 19:45
Show Gist options
  • Save manvillej/5fd3939c373d5ef3c3e48122bd7ad0e9 to your computer and use it in GitHub Desktop.
Save manvillej/5fd3939c373d5ef3c3e48122bd7ad0e9 to your computer and use it in GitHub Desktop.
Neighbors if the Knight Dialer
NEIGHBORS_MAP = {
1: (6, 8),
2: (7, 9),
3: (4, 8),
4: (3, 9, 0),
5: tuple(), # 5 has no neighbors
6: (1, 7, 0),
7: (2, 6),
8: (1, 3),
9: (2, 4),
0: (4, 6),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment