{-# OPTIONS_HADDOCK hide #-}

module Brillo.Internals.Interface.Simulate.State (
  State (..),
  stateInit,
)
where


-- | Simulation state
data State
  = State
  { State -> Integer
stateIteration :: !Integer
  -- ^ The iteration number we're up to.
  , State -> Int
stateResolution :: !Int
  -- ^ How many simulation setps to take for each second of real time
  , State -> Float
stateSimTime :: !Float
  -- ^ How many seconds worth of simulation we've done so far
  }


-- | Initial control state
stateInit :: Int -> State
stateInit :: Int -> State
stateInit Int
resolution =
  State
    { stateIteration :: Integer
stateIteration = Integer
0
    , stateResolution :: Int
stateResolution = Int
resolution
    , stateSimTime :: Float
stateSimTime = Float
0
    }