hanabi-dealer 0.3.0.0 → 0.3.0.1
raw patch · 3 files changed
+7/−3 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- Game/Hanabi.hs +2/−2
- hanabi-dealer.cabal +1/−1
ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for hanabi-dealer + ## 0.3.0.1 -- 2020-01-12++ * fix bestPossibleRank (and thus isUseless)+ ## 0.3.0.0 -- 2020-01-12 * playable client/server system via WebSocket
Game/Hanabi.hs view
@@ -162,8 +162,8 @@ -- | the best achievable rank for each color. bestPossibleRank :: PublicInfo -> Color -> Number-bestPossibleRank pub iro = toEnum $ length $ dropWhile (==0) $ zipWith subtract (reverse $ numCards (gameSpec pub) iro)- (map ((discarded pub IM.!) . cardToInt . C iro) [K5, K4 .. K1])+bestPossibleRank pub iro = toEnum $ length $ takeWhile (/=0) $ zipWith subtract (numCards (gameSpec pub) iro)+ (map ((discarded pub IM.!) . cardToInt . C iro) [K1 .. K5]) numCards :: GameSpec -> Color -> [Int] numCards gs iro = if iro==Multicolor then numMulticolors $ rule gs else [3,2,2,2,1] -- | isUseless pi card means either the card is already played or it is above the bestPossibleRank.
hanabi-dealer.cabal view
@@ -10,7 +10,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.3.0.0+version: 0.3.0.1 -- A short (one-line) description of the package. synopsis: Hanabi card game