|
|
@ -24,11 +24,11 @@ main = do args <- getArgs |
|
|
|
str <- BS.readFile file |
|
|
|
(id, gmseed) <- return (readInput str) |
|
|
|
commandspoints <- return (map (\(seed,game) -> strat1 game) gmseed) |
|
|
|
(commands,pointslastnotes) <- return $ unzip commandspoints |
|
|
|
(commands,points) <- return $ unzip commandspoints |
|
|
|
seeds <- return ((map (\(seed, _) -> seed)) gmseed) |
|
|
|
putStrLn . encodeJSON $ (packAll id seeds commands) |
|
|
|
print pointslastnotes |
|
|
|
-- writeFile ("scores") (scoredata id (fst $ unzip gmseed) points) |
|
|
|
-- print points |
|
|
|
writeFile ("scores") (scoredata id (fst $ unzip gmseed) points) |
|
|
|
|
|
|
|
|
|
|
|
packAll :: Int -> [Int] -> [[Command]] -> [JSONSer] |
|
|
|