Skip to content

Instantly share code, notes, and snippets.

@jezinka
Created May 24, 2020 06:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jezinka/98d1a220555dad4e237021d8bea23cc8 to your computer and use it in GitHub Desktop.
Save jezinka/98d1a220555dad4e237021d8bea23cc8 to your computer and use it in GitHub Desktop.
private void nextCell() {
if (columnIndex < this.board.size() - 1) {
columnIndex++
} else {
columnIndex = 0
rowIndex++
}
}
private void previousCell() {
if (columnIndex > 0) {
columnIndex--
} else {
columnIndex = this.board.size() - 1
rowIndex--
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment