|
|
@ -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 |
|
|
|