save_promo_image() saves a promo image of a game.
This is usually just a starting diagram for the game but
sometimes we may create a custom image.
Usage
save_promo_image(game, gk = game_kit(), file = NULL, ...)Arguments
- game
Game name. Will be normalized by
normalize_name().- gk
A
game_kitR6 object.- file
Filename for the image. If
NULLwe'll generate a pdf image with an appropriate name givengame.- ...
Passed to
piecepackr::render_piece().
Value
A list with the width, height, and filename of the promo image. As a side effect we save an image to disk.
Details
If we haven't created a custom image for this game then basically
we'll convert the game name to snake case, prepend a "df_"
in front and then dynGet() a function with that name and use
the resulting data frame with piecepackr::render_piece().
See df_game for list of games directly supported by this package.