diff --git a/src/Main0.hs b/src/Main0.hs index 0269195..51ce09b 100644 --- a/src/Main0.hs +++ b/src/Main0.hs @@ -6,7 +6,7 @@ import Data.Aeson import Data.Aeson.Types import System.Environment -import qualified Data.ByteString.Lazy as BS +import qualified Data.ByteString.Lazy.Char8 as BS import System.IO import Datatypes import Opt @@ -32,10 +32,9 @@ main = do args <- getArgs commandspoints <- return (map (\(seed,game) -> strat0 game) gmseed) (commands,points) <- return $ unzip commandspoints seeds <- return ((map (\(seed, _) -> seed)) gmseed) - putStrLn $ show $ encode $ (packAll id seeds commands) + BS.putStrLn $ encode $ (packAll id seeds commands) writeFile ("scores") (scoredata id (fst $ unzip gmseed) points) - packAll :: Int -> [Int] -> [[Command]] -> [JSONSer] packAll id seeds commandLists = zipWith (\x y -> JSONSer id x "lilik0" y) seeds commandStrings where diff --git a/src/Main1.hs b/src/Main1.hs index b13330b..d55b016 100644 --- a/src/Main1.hs +++ b/src/Main1.hs @@ -6,7 +6,7 @@ import Data.Aeson import Data.Aeson.Types import System.Environment -import qualified Data.ByteString.Lazy as BS +import qualified Data.ByteString.Lazy.Char8 as BS import System.IO import Datatypes import Opt @@ -32,8 +32,7 @@ main = do args <- getArgs commandspoints <- return (map (\(seed,game) -> strat1 game) gmseed) (commands,points) <- return $ unzip commandspoints seeds <- return ((map (\(seed, _) -> seed)) gmseed) - putStrLn $ show $ encode $ (packAll id seeds commands) --- print points + BS.putStrLn $ encode $ (packAll id seeds commands) writeFile ("scores") (scoredata id (fst $ unzip gmseed) points)