take_a_step: Track one movement

Description Usage Arguments Details Value Examples

View source: R/take_a_step.R

Description

Track one step of unknown movement by Jack, either on roads or through alleyways

Usage

1
take_a_step(paths, roads, blocked = NULL)

Arguments

paths

list of all possible paths already traveled

roads

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

blocked

list of node pairs which cannot be traversed because a police officer blocks it (should not be used for special movement)

Details

The non-directional edge pairs are available via data(roads) or data(alley) This function does not account for the rule that Jack cannot travel through a road occupied by a police officer.

Value

list of all possible paths traveled by Jack

Examples

1
2
3
4
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)

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