Skip to content

Commit

Permalink
fix: change return value of rand_hands
Browse files Browse the repository at this point in the history
  • Loading branch information
paithiov909 committed Dec 9, 2024
1 parent 722abae commit 511f97e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: shikakusphere
Title: Miscellaneous Functions for Japanese Mahjong
Version: 0.1.1
Version: 0.1.2
Authors@R: c(
person("Akiru", "Kato", , "paithiov909@gmail.com", role = c("aut", "cre")),
person("tomo", "hxx", role = "ctb",
Expand Down
8 changes: 5 additions & 3 deletions R/rand.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @returns A tibble that consists of 4 columns of `paistr` vector.
#' @export
#' @examples
#' rand_qipai(4)
#' rand_qipai(3)
rand_qipai <- function(nrow, rule = default_rule(), seed = sample.int(1e4, 1)) {
if (!is_valid_rule(rule)) {
rlang::abort("The rule set is invalid.")
Expand All @@ -32,10 +32,12 @@ rand_qipai <- function(nrow, rule = default_rule(), seed = sample.int(1e4, 1)) {
#' @param seed An integer scalar.
#' Used for initializing the random number generator.
#' @returns
#' A function inheriting class \code{purrr_function_partial}
#' A function inheriting class `purrr_function_compose`
#' that takes single arguments `n`: number of hands to be generated.
#' @export
#' @importFrom purrr partial
#' @examples
#' rand_hands()(3)
rand_hands <- function(
hupai = c(
"pinghe", # defaults to pinghe
Expand Down Expand Up @@ -314,5 +316,5 @@ rand_hands <- function(
)
)
# nolint end
func
purrr::compose(paistr, func)
}
5 changes: 4 additions & 1 deletion man/rand_hands.Rd

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

2 changes: 1 addition & 1 deletion man/rand_qipai.Rd

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

0 comments on commit 511f97e

Please sign in to comment.