Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Encoding: UTF-8
Package: ppdf
Type: Package
Title: Board Game Setups
Version: 0.3.0-16
Version: 0.3.0-17
Authors@R: c(person("Trevor L.", "Davis", role=c("aut", "cre"),
email="trevor.l.davis@gmail.com",
comment = c(ORCID = "0000-0001-6341-4639")))
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ export(piecepack_thai_checkers)
export(piecepack_the_in_crowd)
export(piecepack_the_magic_bag)
export(piecepack_the_penguin_game)
export(piecepack_three_musketeers)
export(piecepack_tic_tac_toe)
export(piecepack_tiles)
export(piecepack_tornado_vs_trailer_park)
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ New features
+ `piecepack_seega()`
+ `piecepack_tablan()`
+ `piecepack_tariffs()`
+ `piecepack_three_musketeers()`
+ `piecepack_tic_tac_toe()`
+ `piecepack_tornado_vs_trailer_park()`
+ `piecepack_yote()`
Expand Down
24 changes: 24 additions & 0 deletions R/piecepack_games_other.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ piecepack_games_other <- function() {
, "``piecepack_quatri()``"
, NA_character_
, "https://www.ludism.org/ppwiki/Quatri"
, "Three Musketeers"
, "``piecepack_three_musketeers()``"
, NA_character_
, "https://boardgamegeek.com/boardgame/21861/three-musketeers"
)
}

Expand Down Expand Up @@ -296,3 +300,23 @@ piecepack_quatri <- function() {
)
bind_rows(df_tiles, df_coins)
}

#' @rdname piecepack_games_other
#' @export
piecepack_three_musketeers <- function() {
df_t <- piecepack_rectangular_board(5L, 5L)
df_p <- piecepack_pawns(
suit = c(4L, 3L, 1L),
x = c(1L, 3L, 5L),
y = c(1L, 3L, 5L),
angle = 0
)
df_c <- piecepack_coins(
side = "face",
x = rep_len(1:5, length.out = 24L)[-c(1L, 13L)],
y = rep.int(1:5, times = c(4L, 5L, 4L, 5L, 4L)),
suit = rep.int(1:4, c(6L, 6L, 5L, 5L)),
rank = c(1:6, 1:6, 1:5, 1:5)
)
bind_rows(df_t, df_p, df_c)
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ animate_game(game, file = "man/figures/README-relativity.gif",

### <a name="piecepack">Piecepacks</a>

`{ppdf}` supports the following 113 games playable with a piecepack deck (plus possibly additional components):
`{ppdf}` supports the following 114 games playable with a piecepack deck (plus possibly additional components):

* [12345ive!](https://boardgamegeek.com/boardgame/154644/12345ive)
* [Achi](https://en.wikipedia.org/wiki/Achi_(game))
Expand Down Expand Up @@ -332,6 +332,7 @@ animate_game(game, file = "man/figures/README-relativity.gif",
* [The "In" Crowd](https://www.ludism.org/ppwiki/TheInCrowd)
* [The Magic Bag](https://www.ludism.org/ppwiki/The_Magic_Bag)
* [The Penguin Game](https://www.ludism.org/ppwiki/PenguinGame)
* [Three Musketeers](https://boardgamegeek.com/boardgame/21861/three-musketeers)
* [Tic-tac-toe](https://en.wikipedia.org/wiki/Tic-tac-toe)
* [Tornado vs. Trailer Park](https://www.ludism.org/ppwiki/Tornado_vs._Trailer_Park)
* [Tower of Babel AKA (Piecepack) Accordion](https://www.ludism.org/ppwiki/TowerOfBabel)
Expand Down
6 changes: 5 additions & 1 deletion man/piecepack_games_other.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions tests/testthat/_snaps/piecepack_games_other.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,3 +386,21 @@
└─┸─┴─┸─┘
a b c d

---

Code
cat_piece(piecepack_three_musketeers(), annotate = TRUE)
Output

5 a⃝─2⃝─3⃝─4⃝─☀⃟
│ ┃ │ ┃ │
4 a⃝━2⃝━3⃝━4⃝━n⃝
│ ┃ │ ┃ │
3 3⃝─4⃝─♛⃟─5⃝─n⃝
│ ┃ │ ┃ │
2 4⃝━5⃝━n⃝━a⃝━2⃝
│ ┃ │ ┃ │
1 ⸸⃟─n⃝─a⃝─2⃝─3⃝

a b c d e

2 changes: 1 addition & 1 deletion tests/testthat/test-games_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test_that("*_games() row counts", {
expect_equal(nrow(go_games()), 2L)
expect_equal(nrow(marble_games()), 0L)
expect_equal(nrow(morris_games()), 7L)
expect_equal(nrow(piecepack_games()), 113L)
expect_equal(nrow(piecepack_games()), 114L)
expect_equal(nrow(reversi_games()), 2L)
expect_equal(nrow(stackpack_games()), 10L)
expect_equal(nrow(tarot_games()), 0L)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-piecepack_games_other.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ test_that("piecepack other games work as expected", {
expect_snapshot(cat_piece(piecepack_lines_of_action(), reorient = "all", annotate = TRUE))
expect_snapshot(cat_piece(piecepack_lukawan(), annotate = TRUE))
expect_snapshot(cat_piece(piecepack_quatri(), annotate = TRUE))
expect_snapshot(cat_piece(piecepack_three_musketeers(), annotate = TRUE))
})
Loading