Created
November 7, 2018 17:33
-
-
Save iamkevinlowe/158d6f543487a067d350d5b91c2e6700 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
// Create a function to test if these sudoku puzzles are correct | |
// correct | |
[ | |
[1,2,3,4,5,6,7,8,9],[4,5,6,7,8,9,1,2,3],[7,8,9,1,2,3,4,5,6], | |
[2,3,4,5,6,7,8,9,1],[5,6,7,8,9,1,2,3,4],[8,9,1,2,3,4,5,6,7], | |
[3,4,5,6,7,8,9,1,2],[6,7,8,9,1,2,3,4,5],[9,1,2,3,4,5,6,7,8] | |
], | |
// incorrect, 5 twice in block 5 | |
[ | |
[1,2,3,4,5,6,7,8,9],[4,5,6,7,8,9,1,2,3],[7,8,9,1,2,3,4,5,6], | |
[2,3,4,5,6,7,8,9,1],[5,6,7,8,9,1,2,3,5],[8,9,1,2,3,4,5,6,7], | |
[3,4,5,6,7,8,9,1,2],[6,7,8,9,1,2,3,4,5],[9,1,2,3,4,5,6,7,8] | |
], | |
// incorrect, numbers in block 5 shifted by 2 places | |
[ | |
[1,2,3,4,5,6,7,8,9],[4,5,6,7,8,9,1,2,3],[7,8,9,1,2,3,4,5,6], | |
[2,3,4,5,6,7,8,9,1],[7,8,9,1,2,3,4,5,6],[8,9,1,2,3,4,5,6,7], | |
[3,4,5,6,7,8,9,1,2],[6,7,8,9,1,2,3,4,5],[9,1,2,3,4,5,6,7,8] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment