sudokuAlt (version 0.2-0)

as.sudoku: Generic Sudoku Game Constructor

Description

Construct a Sudoku Game Object

Usage

as.sudoku(x, ...)

Arguments

x

an n^2 x n^2 matrix object to represent the game

...

Other additional arguments (currently ignored)

Value

An object of class 'sudoku'

Details

Coerce an object to one that can be used as a sudoku game. IMPORTANT: games are represented as n^2xn^2 character matrices, using 1-9 for n=2 or 3, and LETTERS[1:(n^2)] for n = 4 or 5.

Examples

Run this code
# NOT RUN {
M <- as.sudoku(matrix("", 16, 16))
M[1:4, 1:4] <- matrix(LETTERS[1:16], 4, 4, byrow = TRUE)
sM <- solve(M)
plot(sM)
# }

Run the code above in your browser using DataCamp Workspace