generate_board_mat: generate_board_mat

Description Usage Arguments Value Examples

View source: R/utils.R

Description

generate_board_mat

Usage

1
generate_board_mat(n = 5, p = 0.25)

Arguments

n

a positive integer denote the size of the board

p

a number between 0 and 1 that denotes the fraction of the 'n^2' squares are blocked

Value

matrix with random (0, 1) (n^2 size with n^2 * p numbers of blocked(1), rest (0))

Examples

1
0 is blocked(black) 1 is non-blocked(white)

sthkindacrazy/percolate documentation built on Nov. 5, 2019, 9:38 a.m.