Skip to content

Instantly share code, notes, and snippets.

@alexgolec
Created December 2, 2018 17:31
Show Gist options
  • Save alexgolec/57ad57c1f413824f7c98b6fc1e4a7ec2 to your computer and use it in GitHub Desktop.
Save alexgolec/57ad57c1f413824f7c98b6fc1e4a7ec2 to your computer and use it in GitHub Desktop.
NEIGHBORS_MAP = {
0: (0, 0, 0, 0, 1, 0, 1, 0, 0, 0),
1: (0, 0, 0, 0, 0, 0, 1, 0, 1, 0),
2: (0, 0, 0, 0, 0, 0, 0, 1, 0, 1),
3: (0, 0, 0, 1, 0, 0, 0, 0, 1, 0),
4: (1, 0, 0, 1, 0, 0, 0, 0, 0, 1),
5: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
6: (1, 1, 0, 0, 0, 0, 0, 1, 0, 0),
7: (0, 0, 1, 0, 0, 0, 1, 0, 0, 0),
8: (0, 1, 0, 1, 0, 0, 0, 0, 0 ,0),
9: (0, 0, 1, 0, 1, 0, 0, 0, 0, 0),
}
@briochemc
Copy link

Matrix should be symmetric! (See forked gist) 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment