game_of_life: Game of life

Description Usage Arguments Value Examples

Description

Game of life

Usage

1
2
3
game_of_life(sandbox_dimension = 100, iterations = 300,
  probability_of_initial_existence = 0.35, interactive = TRUE,
  delay_time = 10, path = "~/")

Arguments

sandbox_dimension

(integer) Dimension of the sandbox, by default are 100 (a 100 x 100 matrix).

iterations

(integer) Number of simulations that will be stored in the exported file, by default 300 simulations are stored.

probability_of_initial_existence

(double) Probability that a cell exists at the beginning of the simulation.

interactive

(Boolean) Should export a .Gif? or return as array?.

delay_time

(integer) Time in milliseconds of waiting for the frame change in the .GIF animation.

path

(string) Path where the .GIF file will be saved.

Value

.Gif File with the simulation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
game_of_life()
game_of_life(sandbox_dimension = 100)
game_of_life(sandbox_dimension = 100, iterations = 300)
game_of_life(sandbox_dimension = 100, iterations = 300,
             probability_of_initial_existence = 0.35)
game_of_life(sandbox_dimension = 100, iterations = 300,
             probability_of_initial_existence = 0.35, delay_time = 5)
game_of_life(sandbox_dimension = 150, iterations = 100,
             probability_of_initial_existence = 0.15, delay_time = 20)

## End(Not run)

frahik/GameOfLife-R documentation built on May 23, 2019, 8:55 a.m.