R/update_cell.R

Defines functions update_cell

update_cell <- function(board, cell, i, j, nrow, ncol, to_hide = FALSE) {
  draw_cell(cell, i, j)
  board[[i, j]] <- cell
  if(to_hide) attr(board, "hide")[[i, j]] <- TRUE
  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.