solve_fujisan | R Documentation |
Solves a game of Fujisan (if possible).
solve_fujisan(coins = random_fujisan_coins(), dice = random_dice() - 1)
coins |
A vector or matrix of Fujisan coin layout. Default is a random layout. |
dice |
A vector of Fujisan dice layout. Default is random dice. Usually not needed. |
A list with solution of Fujisan solution, its length, coin layout, dice (if needed), and portable piecepack notation.
puzzle2 <- matrix(c(4, 4, 4, 5, 2, 0, 2, 4, 0, 3, 1, 1,
1, 2, 5, 3, 3, 5, 3, 2, 5, 1, 0, 0), nrow = 2, byrow = TRUE)
s2 <- solve_fujisan(coins = puzzle2)
g2 <- read_ppn(textConnection(s2$ppn))[[1]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.