Created
August 6, 2018 02:13
-
-
Save BeauNouvelle/6dca390a9a2a5956d3c9aeaa9206d598 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let firstCell = Cell(x: 10, y: 10, state: .dead) | |
| let secondCell = Cell(x: 11, y: 11, state: .dead) | |
| print(firstCell.isNeighbor(to: secondCell)) | |
| // true - Adjacent row, adjacent column. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment