diff --git a/src/Main1.hs b/src/Main1.hs index 34232af..6d3c79b 100644 --- a/src/Main1.hs +++ b/src/Main1.hs @@ -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] diff --git a/src/Strategy1.hs b/src/Strategy1.hs index 73f5498..dfc9509 100644 --- a/src/Strategy1.hs +++ b/src/Strategy1.hs @@ -4,9 +4,9 @@ import Datatypes import VM -strat1 :: Game -> ([Command],(Int,Notes)) +strat1 :: Game -> ([Command],Int) strat1 game = if new_notes == GameOver - then (new_command : [], (score new_game, new_notes)) + then (new_command : [], score new_game) else (new_command : (fst $ strat1 new_game), snd $ strat1 new_game) where (new_game_se,notes_se) = step game MoveSE