Learn R Programming

shipunov (version 1.4)

Life: Game of Life

Description

Conway's Game of Life

Usage

Life(n.rows=40, n.cols=40, n.cycles=100, sleep.time=0.05,
 cols=c("#f0f0f0", "#2f81c1"), rnd.threshold=0.3)

Arguments

n.rows

Number of rows

n.cols

Number of columns

n.cycles

Number of cycles

sleep.time

Time for pause after each cycle

cols

Main colors

rnd.threshold

0 empty board; 1 all squares are filled

Details

Please note that at the moment, this function is not interactive.

Examples

Run this code
# NOT RUN {
Life(10, 10, 10, .3)
# }

Run the code above in your browser using DataLab