Learn R Programming

lightsout (version 0.3.2)

empty_board: Initialize a Lights Out board with all lights switched off

Description

Initialize a Lights Out board with all lights switched off

Usage

empty_board(size, classic = TRUE)

Value

A lightsout board.

Arguments

size

Number of rows and columns for the board

classic

If TRUE, then pressing a light will toggle it and its adjacent neighbours only. If FALSE, then pressing a light will toggle the entire row and column of the pressed light.

See Also

random_board new_board

Examples

Run this code
empty_board(5)

Run the code above in your browser using DataLab