show_board {whitechapelR}R Documentation

Display game board representation

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

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

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)

[Package whitechapelR version 0.3.0 Index]