p7/State.hs

18 lines
398 B
Haskell
Raw Normal View History

2018-06-24 17:26:43 -04:00
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