sudokuAlt (version 0.2-0)

solve.sudoku: Solve a Sudoku Puzzle

Description

Solve a Sudoku Puzzle

Usage

# S3 method for sudoku
solve(a, ...)

Arguments

a

A sudoku game object to be solved

...

Extra arguments (curently ignored)

Value

a solved game, or NULL if no solution exists.

Details

An alternative front end to solveGame as a method for the base generic function solve.

Examples

Run this code
# NOT RUN {
set.seed(1234)
makeGame(3, gaps = 59) %>% solve %>% plot -> sg
originalGame(sg)

g <- emptyGame(4)  # construct a patterned game
diag(g) <- LETTERS[1:16]
g %>% solve %>% plot -> sg
sg
# }

Run the code above in your browser using DataCamp Workspace