upArray: Update puzzle array given values i, j, and k

Description Usage Arguments Value Examples

Description

This function takes a puzzle array and a solution for the puzzle given as an [i, j, k] index and update the array given the provided solution.

Usage

1
upArray(puzArr, i, j, k)

Arguments

puzArr

9x9x9 array corresponding to the sudoku puzzle to be solved.

i, j

integer between 1 and 9 referrencing the [i, j] element of the sudoku puzzle matrix and puzzle array

k

integer between 1 and 9. Represents the value that goes in the [i, j] cell of the puzzle matrix and is the third dimension index of the puzzle array.

Value

Returns an updated puzzle array. Given that k goes in the [i, j] element of the puzzle matrix, the puzzle array is updated accordingly by placing TRUE/FALSE values in the appropriate places in the puzzle array.

Function is used within initArray to initialize the puzzle array given the starting values of the sudoku puzzle.

Examples

1
## Not run: upArray(b, 1, 1, 1)

JamesCuster/sudokusolvr documentation built on June 4, 2019, 7:46 a.m.