module Level.File (level) where import Types import Level.Shuffle import qualified Level.Tutorial import Control.Applicative level :: Rand -> FilePath -> IO (Level, Level) level r f = do ls <- lines <$> readFile f return (rand $ ShuffleableSection ls, Level.Tutorial.level) where rand = case r of Rand g -> shuffle g _ -> asis