powered by
Save a recorded game of minesweeper to a GIF file.
save_minesweeper_gif( recording, gif_file = "animation.gif", width = 800, height = 600, delay = 1, loop = TRUE, progress = TRUE, ... )
The file path of the GIF file.
object of class "minesweeper_recording" returned by play_minesweeper()
play_minesweeper()
output gif file
gif width in pixels
gif height in pixel
time to show each image in seconds
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.
print some verbose status output
other graphical parameters passed to png
Reduce the delay for greater temporal resolution.
delay
if (FALSE) { # interactive() && requireNamespace("gifski", quietly = TRUE) dev.new(noRStudioGD = TRUE) recording <- play_minesweeper() save_minesweeper_gif(recording) dev.off() }
Run the code above in your browser using DataLab