Post-Cancellation, Pre-Nisei Netrunner Rotation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
477B

  1. module State where
  2. import System.Random
  3. import Packs
  4. type State = (Pool, BoxQueue, StdGen)
  5. data InRot = Ir DataPack deriving (Show, Eq)
  6. data OutRot = Or DataPack Integer
  7. instance Eq OutRot where
  8. (Or d1 _) == (Or d2 _) = d1 == d2
  9. data BoxQueue = Bq [Maybe BigBox]
  10. type Pool = ([InRot], [OutRot])
  11. createInRot :: [DataPack] -> [InRot]
  12. createInRot x = map (\n -> Ir n) x
  13. createOutRot :: [DataPack] -> [OutRot]
  14. createOutRot x = map (\n -> Or n 0) x