Save a recorded game of minesweeper to a GIF file.
Usage
save_minesweeper_gif(
recording,
gif_file = "animation.gif",
width = 800,
height = 600,
delay = 1,
loop = TRUE,
progress = TRUE,
...
)
Arguments
- recording
object of class "minesweeper_recording" returned by
play_minesweeper()
- gif_file
output gif file
- width
gif width in pixels
- height
gif height in pixel
- delay
time to show each image in seconds
- loop
if the gif should be repeated. Set to FALSE to only play once, or a number to indicate how many times to repeat after the first.
- progress
print some verbose status output
- ...
other graphical parameters passed to png
Examples
if (FALSE) { # .Platform$OS.type == "unix" && interactive() && requireNamespace("gifski", quietly = TRUE)
x11() # Unix-specific example
recording <- play_minesweeper()
save_minesweeper_gif(recording)
dev.off()
}