Skip to content

Instantly share code, notes, and snippets.

@BeauNouvelle
Created August 6, 2018 02:13
Show Gist options
  • Select an option

  • Save BeauNouvelle/6dca390a9a2a5956d3c9aeaa9206d598 to your computer and use it in GitHub Desktop.

Select an option

Save BeauNouvelle/6dca390a9a2a5956d3c9aeaa9206d598 to your computer and use it in GitHub Desktop.
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