BattleCity.Tank (battle_city v0.1.8) View Source

Tank

Link to this section Summary

Link to this section Types

Specs

health() :: 1..10

Specs

points() :: integer()

Specs

t() :: %BattleCity.Tank{
  __callbacks__: [BattleCity.ContextCallback.t()],
  __index__: integer(),
  __module__: module(),
  __opts__: map(),
  changed?: boolean(),
  dead?: boolean(),
  enemy?: boolean(),
  freezed?: boolean(),
  health: health(),
  hidden?: boolean(),
  id: BattleCity.id(),
  lifes: integer(),
  meta: BattleCity.Tank.Base.t(),
  moving?: boolean(),
  position: BattleCity.Position.t(),
  reason: BattleCity.reason(),
  shield?: boolean(),
  shootable?: boolean(),
  speed: BattleCity.Position.speed(),
  with_power_up?: boolean()
}

Link to this section Functions

Link to this function

handle_hit(ctx, tank, bullet)

View Source

Specs

handle_hit(BattleCity.Context.t(), t(), BattleCity.Bullet.t()) ::
  {:ok, BattleCity.Context.t(), t()}
Link to this function

handle_hit_1(tank, arg2)

View Source

Specs

normalize(t(), integer()) :: t()