Skip to content

Instantly share code, notes, and snippets.

@jezinka
Created October 16, 2018 07:42
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/5e01e21486854f74e624019ed68e51f9 to your computer and use it in GitHub Desktop.
Save jezinka/5e01e21486854f74e624019ed68e51f9 to your computer and use it in GitHub Desktop.
class Board {
Integer[][] sample = [
[0, 0, 0, 0, 0, 2, 0, 0, 3],
[6, 0, 0, 0, 3, 0, 0, 0, 9],
[9, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 4, 5, 0, 0, 0, 6, 0, 0],
[8, 0, 0, 6, 0, 0, 3, 0, 7],
[0, 0, 0, 0, 0, 0, 8, 5, 2],
[4, 9, 0, 0, 6, 3, 0, 0, 5],
[0, 3, 0, 5, 0, 8, 0, 0, 0],
[0, 0, 0, 4, 9, 0, 0, 0, 0]
]
Cell[][] board = new Cell[9][9]
Board() {
for (int i = 0; i < sample.length; i++) {
for (int j = 0; j < sample[i].length; j++) {
board[i][j] = new Cell(value: sample[i][j])
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment