revealTile: Function to reveal msBoard tiles

Description Usage Arguments Value See Also

View source: R/auxFunctions.R

Description

This function implements a recursive version of the Flood Fill algorithm in the x_mask matrix. It starts at the specified x_mask[row,col] coordinates and tries to fill the 8 neighbouring matrix elements with a 1 when such elements (both in x_mask and x_real matrices) are 0. This function is mainly used to update a msBoard object in a msweepeR session.

Usage

1
revealTile(x_real, x_mask, row, col)

Arguments

x_real

A matrix.

x_mask

A matrix. Must be of same width and length as x_real.

row

A positive integer indicating the row number where the Flood Fill will start.

col

A positive integer indicating the col number where the Flood Fill will start.

Value

This function returns an updated (flooded) version of the matrix x_mask.

See Also

msweepeR, msBoard


pablorm296/msweepeR documentation built on Nov. 4, 2019, 11:16 p.m.