mine_sweeper: Play the Miner game in R

Description Usage Arguments Note Author(s) References Examples

View source: R/mine_sweeper.R

Description

The controls should be familiar to you: Click the left mouse button to dig in an area, and right button to mark or unmark the area with flags.

Usage

1
2
mine_sweeper(width = 10, height = 10, mines = 20, 
    text.cex = 2, cheat = FALSE, seed = NULL)

Arguments

width

number of grids in horizontal axis

height

number of grids in vertical axis

mines

number of mines

text.cex

the amount by which text in graphics should be magnified relative to the default. Adjust this parameter when the size of text doesn't fit the grid

cheat

logical. If TRUE a matrix indicating the mines will be printed

seed

seed for random number generator

Note

Linux/Mac users have to use X11(type = 'Xlib') or the Cairo graphics device Cairo() in the package cairoDevice.

Author(s)

Yixuan Qiu [email protected]

References

http://en.wikipedia.org/wiki/Minesweeper_(computer_game)

Examples

1
2
3
4
5
6
7
8
## should use Xlib for the x11() device under *nix, e.g
## Not run: 
if (.Platform$OS.type == "windows") 
    x11() else x11(type = "Xlib")

## End(Not run)

mine_sweeper()

fun documentation built on May 30, 2017, 1:51 a.m.