Learn R Programming

Miney (version 0.1)

miney: Clearing mines from a given field.

Description

A simple implementation of the game where one clears bombs (or flowers -- see the wikipedia entry for 'minesweeper') from a given field. After starting the game by entering miney(5), for instance, the user/player needs to click on the plotted elements to see how many neighbors are bombs/flowers/.... The game is over if the players hits a bomb or when the player has cleared all non-bomb/flower/...-elements.

Usage

miney(n)

Arguments

n
determines the size of the matrix. If n=5, the game will use a 5 by 5 matrix.

Value

No value returned. Function is used for its side effects.

Examples

Run this code
## Not run: miney(5)  

Run the code above in your browser using DataLab