game_solvers: Solve Fujisan game

solve_fujisanR Documentation

Solve Fujisan game

Description

Solves a game of Fujisan (if possible).

Usage

solve_fujisan(coins = random_fujisan_coins(), dice = random_dice() - 1)

Arguments

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.

Value

A list with solution of Fujisan solution, its length, coin layout, dice (if needed), and portable piecepack notation.

Examples

 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]]

piecepackr/ppgames documentation built on Jan. 17, 2025, 2:24 p.m.