neighbors: Neighbors

Description Usage Arguments Value Examples

Description

Returns a matrix representing all neighbors for a given board

Usage

1
neighbors(padded_board)

Arguments

padded_board

A square matrix representing a boggle board surrounded by NA cells.

Value

an adjacency matrix where each column represents one cell in the boggle board matrix, and each row represents one of 8 possible adjacent cells.

Examples

1
2
3
board        <- random_board()
padded_board <- cbind(NA,rbind(NA,board,NA),NA)
neighbors(padded_board)

ezgraphs/rbogglesolver documentation built on May 16, 2019, 9:56 a.m.