sudokuAlt (version 0.2-0)

regulariseGame: regulariseGame

Description

Put a solved sudoku game into a canonical form

Usage

regulariseGame(g, ...)

# S3 method for sudoku regulariseGame(g, target = c("block", "col", "row"), ...)

# S3 method for default regulariseGame(g, ...)

Arguments

g

a solved sudoku game

...

additional arguments to methods (currently not used)

target

character; which section do you want to be in sorted order?

Value

a regularised solved sudoku game

Details

If a solved sudoku game is to be used as an experimental design it is sometimes useful to re-arrange the symbols so that either the first row, first column or top left block symbols are in sorted order. This function accomplishes this task.

Examples

Run this code
# NOT RUN {
set.seed(1234)
g <- makeGame() %>%
     solve() %>%    
     regulariseGame(target = "b") %>% 
     plot()
plot(originalGame(g))
# }

Run the code above in your browser using DataCamp Workspace