GamesEngine.Grid.Tile (games_engine v0.3.2)
Tile Component Representation of a Game Tile on a Grid
Summary
Functions
Adds a new attributes to a %Tile{}
Will not overwrite the attribute if it already exists
Creates a new %Tile{}
struct
row/col validation is relegated to the %Coordinate{}
module
Replaces the entire attributes map of a %Tile{}
with a new map
Updates an existing attribute of a %Tile{}
Types
Functions
Link to this function
add_attribute(tile, key, value)
Adds a new attributes to a %Tile{}
Will not overwrite the attribute if it already exists
Link to this function
new(arg)
@spec new({non_neg_integer(), non_neg_integer()}) :: t() | {:error, String.t()}
Creates a new %Tile{}
struct
row/col validation is relegated to the %Coordinate{}
module
Link to this function
new(arg, attributes)
@spec new( {non_neg_integer(), non_neg_integer()}, map() ) :: t() | {:error, String.t()}
Link to this function
replace_attributes(tile, attributes)
Replaces the entire attributes map of a %Tile{}
with a new map
Link to this function
update_attribute(tile, key, value)
Updates an existing attribute of a %Tile{}