BattleCity.Context (battle_city v0.1.5) View Source
Context
Link to this section Summary
Link to this section Types
Specs
Specs
object_struct() :: BattleCity.PowerUp.t() | BattleCity.Tank.t() | BattleCity.Bullet.t() | nil
Specs
t() :: %BattleCity.Context{ __counters__: map(), __events__: [BattleCity.Event.t()], __global_callbacks__: [callback_fn()], __opts__: map(), bot_loop_interval: integer(), bullets: %{required(BattleCity.id()) => BattleCity.Bullet.t()}, enable_bot: boolean(), level: BattleCity.level(), loop_interval: integer(), mock: boolean(), objects: %{ required(BattleCity.Position.coordinate()) => %{ required(Object.t()) => Object.value() } }, power_ups: %{required(BattleCity.id()) => BattleCity.PowerUp.t()}, rest_enemies: integer(), shovel?: boolean(), slug: term(), stage: BattleCity.Stage.t(), state: state(), tanks: %{required(BattleCity.id()) => BattleCity.Tank.t()}, timeout_interval: integer() }
Link to this section Functions
Specs
all_path_object(t(), BattleCity.Position.t()) :: [ {Object.kv(), BattleCity.Position.direction()} ]
Specs
Specs
Specs
Specs
camp_direction?({Object.kv(), BattleCity.Position.direction()}, boolean()) :: boolean()
Specs
delete_object(t(), BattleCity.object_keys(), BattleCity.id()) :: t()
Specs
Specs
handle_actions(t(), object_struct(), [BattleCity.ContextCallback.t()]) :: t()
Specs
Specs
handle_object(t(), object_struct()) :: t()
Specs
Specs
Specs
object_grids(t(), nil | [BattleCity.short_type()]) :: [Html.t()]
Specs
path_object(t(), BattleCity.Position.t(), BattleCity.Position.direction() | nil) :: [Object.kv()]
Specs
put_changed_object(t(), object_struct()) :: t()
Specs
put_object({t(), object_struct()}) :: t()
Specs
put_object(t(), object_struct() | [object_struct()]) :: t()
Specs
Specs
update_object_raw( t(), BattleCity.object_keys(), BattleCity.id(), update_raw_fun() ) :: t()
Specs
update_object_raw!( t(), BattleCity.object_keys(), BattleCity.id(), update_raw_fun() ) :: t()