battleship-combinatorics 0.0.0.3 → 0.0.1
raw patch · 2 files changed
+6/−6 lines, 2 filesdep ~containersdep ~deepseqdep ~filepathPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: containers, deepseq, filepath, random, set-cover
API changes (from Hackage documentation)
Files
battleship-combinatorics.cabal view
@@ -1,5 +1,5 @@ Name: battleship-combinatorics-Version: 0.0.0.3+Version: 0.0.1 License: BSD3 License-File: LICENSE Author: Henning Thielemann <haskell@henning-thielemann.de>@@ -17,7 +17,7 @@ Build-Type: Simple Source-Repository this- Tag: 0.0.0.3+ Tag: 0.0.1 Type: darcs Location: https://hub.darcs.net/thielema/battleship-combinatorics/ @@ -30,7 +30,7 @@ QuickCheck >=2.5 && <3.0, pooled-io >=0.0.2 && <0.1, combinatorial >=0.0 && <0.2,- set-cover >=0.0.7 && <0.1,+ set-cover >=0.1 && <0.2, temporary >=1.1 && <1.4, directory >=1.1 && <1.4, filepath >=1.3 && <1.5,
src/Combinatorics/Battleship/SetCover.hs view
@@ -97,7 +97,7 @@ printState :: (Int, Int) -> ESC.State (ship, Map (Int, Int) Bool) set -> IO () printState boardSize =- printBoard boardSize . foldMap (snd . ESC.label) . ESC.usedSubsets+ printBoard boardSize . foldMap snd . ESC.usedSubsets printBoard :: (Int, Int) -> Map (Int, Int) Bool -> IO () printBoard boardSize = putStr . ('\n':) . formatBoard boardSize@@ -124,7 +124,7 @@ let loop state = let usedFleet = Fleet.fromList $ map (flip (,) 1) $- mapMaybe (fst . ESC.label) $ ESC.usedSubsets state+ mapMaybe fst $ ESC.usedSubsets state in when (Fleet.subset usedFleet fleet) $ if usedFleet == fleet then printState boardSize state@@ -146,7 +146,7 @@ MT.lift $ sel $ filter ((shipSize==) . fst . ESC.label) $ ESC.availableSubsets state MS.put $ ESC.updateState place state- liftM (foldMap (snd . ESC.label) . ESC.usedSubsets) $+ liftM (foldMap snd . ESC.usedSubsets) $ MS.execStateT (mapM_ layoutShip $ concatMap (uncurry $ flip replicate) fleetList) $ ESC.initState $