put_hor_walls: Put horizontal walls (streets)

View source: R/set_up.R

put_hor_wallsR Documentation

Put horizontal walls (streets)

Description

Helper function for generate_open_moves(). It takes the available data for a piece of horizontal wall (x and y coordinates of its beginning point and its length) and produces a dataset with the positions and directions of prohibited moves for Karel because of this wall.

Usage

put_hor_walls(x, y, lgth)

Arguments

x,

y x and y coordinates of the beginning point of the wall

lgth

length of the wall

Value

A lgth x 3 dataset with coordinates where Karel can't move and the direction (side) towards it can't move because of this piece of horizontal wall.


karel documentation built on March 27, 2022, 1:05 a.m.