R/reveal_surrounding.R

Defines functions reveal_surrounding

reveal_surrounding <- function(board, nbors, nrow, ncol) {
  for(row in seq_len(nrow(nbors))) {
    board <- reveal(board, nbors[row, 1], nbors[row, 2], nrow, ncol)
  }
  board
}

Try the minesweeper package in your browser

Any scripts or data that you put into this service are public.

minesweeper documentation built on April 3, 2025, 9:29 p.m.