Sudoku logic implemented