Learn R Programming

sudokuAlt (version 0.2-1)

fetchUKGame: Retrieve a Sudoku from the UK Site

Description

Retrieve a Sudoku Game

Usage

fetchUKGame(day = NULL)

Arguments

day

positive integer < 30, how many days ago? or NULL for the most recently published game.

Value

The published sudoku game as a sudoku object.

Details

Connects to http://www.sudoku.org.uk/DailySudoku.asp and retrieves the sudoku game from day days ago. Based on a function from a related sudoku package, sudoku::fetchSudokuUK with minor changes.

Examples

Run this code
# NOT RUN {
(g0 <- fetchUKGame())  ## The game for today (according to GMT)
(g3 <- fetchUKGame(3)) ## game from 3 days ago (according to GMT)
if(require(sudoku)) {  ## the original solver
  g0a <- as.sudoku(fetchSudokuUK())  
  identical(g0, g0a)   ## should be TRUE
}
g0 %>% solve %>% plot -> sg0 ## spoil the game
# }

Run the code above in your browser using DataLab