View Source Adventurous.Point (adventurous v0.1.3)

Link to this section Summary

Functions

Returnes coordinates of adjacent points

Moves Point coordinates by given values.

Converts num grid to array of ints

Reads array of integers and convers it into map of point->value and dimensions of grid.

Link to this section Functions

Link to this function

adjacent(point, type \\ :direct)

View Source

Returnes coordinates of adjacent points

Link to this function

move(point, adjust_coords)

View Source
@spec move(
  atom() | %{:x => number(), :y => number(), optional(any()) => any()},
  map()
) ::
  %Adventurous.Point.Point2D{x: number(), y: number()}

Moves Point coordinates by given values.

Link to this function

num_grid_to_string(map, width, height)

View Source

Converts num grid to array of ints

@spec read_num_grid(binary()) :: {map(), non_neg_integer(), non_neg_integer()}

Reads array of integers and convers it into map of point->value and dimensions of grid.