Skip to contents

tibble data frames of setups for 2 reversi variants. Data frame output can usually be plotted with pmap_piece(df, default.units = "in").

Usage

reversi_ming_mang(nrows = 8L, ncols = nrows)

reversi_reversi(nrows = 8L, ncols = nrows)

Arguments

nrows

Number of rows in game board

ncols

Number of columns in game board

Value

A tibble::tibble() data frame with the following columns:

  • "piece_side"

  • "suit"

  • "rank"

  • "cfg" (optional, defaults to "piecepack")

  • "x"

  • "y"

  • "angle" (optional, defaults to 0).

This data frame is compatible with piecepackr::render_piece() and likely ppcli::cat_piece().

Details

Here are links for more information about the various games:

GameURL
Ming Manghttps://boardgamegeek.com/boardgame/40573/ming-mang
Reversihttps://en.wikipedia.org/wiki/Reversi

Examples

df <- reversi_reversi()
if (requireNamespace("ppcli", quietly = TRUE) &&
    packageVersion("ppcli") >= "0.3.0-1") {
  ppcli::cat_piece(df, annotate = TRUE)
}
#>  ┌─┰─┰─┰─┰─┰─┰─┰─┐
#> 8│ ┃ ┃ ┃ ┃ ┃ ┃ ┃ │
#>  ┝━╋━╋━╋━╋━╋━╋━╋━┥
#> 7│ ┃ ┃ ┃ ┃ ┃ ┃ ┃ │
#>  ┝━╋━╋━╋━╋━╋━╋━╋━┥
#> 6│ ┃ ┃ ┃ ┃ ┃ ┃ ┃ │
#>  ┝━╋━╋━╋━╋━╋━╋━╋━┥
#> 5│ ┃ ┃ ┃ ┃ ┃ ┃ ┃ │
#>  ┝━╋━╋━╋━╋━╋━╋━╋━┥
#> 4│ ┃ ┃ ┃ ┃ ┃ ┃ ┃ │
#>  ┝━╋━╋━╋━╋━╋━╋━╋━┥
#> 3│ ┃ ┃ ┃ ┃ ┃ ┃ ┃ │
#>  ┝━╋━╋━╋━╋━╋━╋━╋━┥
#> 2│ ┃ ┃ ┃ ┃ ┃ ┃ ┃ │
#>  ┝━╋━╋━╋━╋━╋━╋━╋━┥
#> 1│ ┃ ┃ ┃ ┃ ┃ ┃ ┃ │
#>  └─┸─┸─┸─┸─┸─┸─┸─┘
#>   a b c d e f g h