p7/State.hs
2018-06-25 09:26:43 +12:00

18 lines
398 B
Haskell

module State where
data Timestamp = Ts Integer Integer Integer
type State = (Pool, BoxQueue, StdGen)
data InRot = Ir DataPack
data OutRot = Or DataPack Integer
data BoxQueue = Bq [Maybe BigBox]
type Pool = ([InRot], [OutRot])
createInRot :: [DataPack] -> [InRot]
createInRot x = map (\n -> Ir n) x
createOutRot :: [DataPack] -> [OutRot]
createOutRot x = map (\n -> Or n 0) x