module Enemy where

import Vec2 (..)
import Board (boardDiagonal)

type Enemy =
  { initTime : Float
  , initPos : Vec2
  , initDest : Vec2
  , move : Float -> Vec2 -> Vec2 -> Float -> Vec2
  }

enemyMove : Enemy -> Float -> Vec2
enemyMove enemy time =
  enemy.move enemy.initTime enemy.initPos enemy.initDest time

enemySize : Float
enemySize = 8

enemySpeed : Float -> Float
enemySpeed dt = dt / 25

enemySpawnDist : Float
enemySpawnDist = boardDiagonal * 3 / 5

enemyAwayDist : Float
enemyAwayDist = boardDiagonal