Browse Source

produce score file before json output

adaptedStrategy0
Zolfa 9 years ago
parent
commit
eb9b51eeea
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/Main0.hs
  2. +1
    -1
      src/Main1.hs

+ 1
- 1
src/Main0.hs View File

@ -32,8 +32,8 @@ main = do args <- getArgs
commandspoints <- return (map (\(seed,game) -> strat0 game) gmseed)
(commands,points) <- return $ unzip commandspoints
seeds <- return ((map (\(seed, _) -> seed)) gmseed)
BS.putStrLn $ encode $ (packAll id seeds commands)
writeFile ("scores") (scoredata id (fst $ unzip gmseed) points)
BS.putStrLn $ encode $ (packAll id seeds commands)
packAll :: Int -> [Int] -> [[Command]] -> [JSONSer]
packAll id seeds commandLists = zipWith (\x y -> JSONSer id x "lilik0" y) seeds commandStrings


+ 1
- 1
src/Main1.hs View File

@ -32,8 +32,8 @@ main = do args <- getArgs
commandspoints <- return (map (\(seed,game) -> strat1 game) gmseed)
(commands,points) <- return $ unzip commandspoints
seeds <- return ((map (\(seed, _) -> seed)) gmseed)
BS.putStrLn $ encode $ (packAll id seeds commands)
writeFile ("scores") (scoredata id (fst $ unzip gmseed) points)
BS.putStrLn $ encode $ (packAll id seeds commands)
packAll :: Int -> [Int] -> [[Command]] -> [JSONSer]


Loading…
Cancel
Save