show_board: Display game board representation

Description Usage Arguments Details Value Examples

View source: R/show_board.R

Description

Show a graph representation of the game board with nodes placed in the appropriate relative spot, colored by the number of paths which include a particular node. Possible hideouts are marked with blue squares.

Usage

1
show_board(paths = NULL, hideouts = NULL, roads, alley, node_locations)

Arguments

paths

optional list of all possible paths already traveled

hideouts

optional vector of possible hideouts from previous rounds.

roads

data.frame of non-directional edge pairs for the road graph

alley

data.frame of non-directional edge pairs for the alley graph

node_locations

data.frame of where nodes should be placed in the graph

Details

roads, alley and node_locations are all bundled with the package (e.g. data(roads)). Solid lines in the graph represent road connections between nodes. Dashed lines represent alley way connections.

Value

plotted igraph object

Examples

1
2
3
4
5
possibilities = start_round(64)
possibilities = take_a_step(possibilities,roads)
possibilities = take_a_step(possibilities,roads,blocked=list(c(63,82),c(63,65)))
possibilities = take_a_step(possibilities,alley)
show_board(paths=possibilities,hideouts=NULL,roads,alley,node_locations)

whitechapelR documentation built on May 2, 2019, 9:36 a.m.