hanabi-dealer 0.4.0.0 → 0.4.0.1
raw patch · 5 files changed
+17/−13 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +6/−0
- Game/Hanabi.hs +3/−2
- Game/Hanabi/Backend.lhs +0/−1
- Game/Hanabi/Client.hs +7/−9
- hanabi-dealer.cabal +1/−1
ChangeLog.md view
@@ -1,5 +1,11 @@ # Revision history for hanabi-dealer + ## 0.4.0.1 -- 2020-01-29++ * fix the bug of the endgame behavior that crept in during the switch to 0.4.0.0++ * adjust the screen for creating a game+ ## 0.4.0.0 -- 2020-01-28 * improve GUI
Game/Hanabi.hs view
@@ -294,7 +294,7 @@ -- | 'Verbosity' is the set of options used by verbose 'Strategy's data Verbosity = V { warnCritical :: Bool -- ^ mark unhinted critical cards with "!!" ("!^" if it is playable and markPlayable==True.)- , markUseless :: Bool -- ^ mark useless cards with "..".+ , markUseless :: Bool -- ^ mark useless cards with ".." , markPlayable :: Bool -- ^ mark playable cards with "_^". ("!^" if it is unhinted critical and warnCritical==True.) , markObviouslyUseless :: Bool -- ^ mark useless cards with "_." based on the hint marks. , markObviouslyPlayable :: Bool -- ^ mark playable cards with "_^" based on the hint marks.@@ -610,7 +610,8 @@ prc (Hint hintedpl eik) = st{publicState = pub{hintTokens = pred $ hintTokens pub, turn = succ $ turn pub, givenHints = snd $ updateNth hintedpl newHints (givenHints pub),- deadline = nextDeadline,+ deadline = case deadline pub of Nothing -> Nothing+ Just i -> Just $ pred i, result = None}} where newHints hs = zipWith zipper (hands st !! hintedpl) hs zipper (C ir ka) (mi,mk) = case eik of Left i | i==ir -> (Just i, mk)
Game/Hanabi/Backend.lhs view
@@ -184,7 +184,6 @@ wordsBy pred xs = case break pred xs of (tk, []) -> [tk] (tk,_:dr) -> tk : wordsBy pred dr isWS = (`elem` ["0", "WS", "via WebSocket"])- interpret :: RandomGen g => Maybe Verbosity -> String -> Params g -> IO () interpret mbVerb inp params
Game/Hanabi/Client.hs view
@@ -162,30 +162,28 @@ tr_ [] [ th_ [solid] [text $ S.pack str] | str <- ["Game ID", "available", "total"] ] : map renderAvailable games, div_ [] [--- table_ [] $ caption_ [textProp "text-align" "left", textProp "margin-left" "auto"] [ -- Seemingly these styles do not work.- text "Player list",+ table_ [solid] $ caption_ [textProp "text-align" "left", textProp "margin-left" "auto"] [ -- Seemingly these styles do not work.+ text "Players", button_ [onClick IncreasePlayers] [text $ S.pack "+"], button_ [onClick DecreasePlayers] [text $ S.pack "-"], input_ [type_ "radio", id_ "shuffle", onClick (From Nothing), checked_ $ from mdl == Nothing],- label_ [for_ "shuffle"] [text "shuffle before the game"],--- x ] :- table_ [] $ [ tr_ [] [td_ [solid] [x], td_ [] [input_ [type_ "radio", id_ iD, onClick (From $ Just n), checked_ $ from mdl == Just n],+ label_ [for_ "shuffle"] [text "shuffle on startup"]+ ] :+-- table_ [solid] $+ [ tr_ [] [td_ [solid] [x], td_ [] [input_ [type_ "radio", id_ iD, onClick (From $ Just n), checked_ $ from mdl == Just n], label_ [for_ iD] [text "Turn 0"]]] | (n,x) <- zip [0..] $ text "You" : reverse (zipWith (renderPlayer strategies) [0..] (players mdl)) , let iD = S.pack $ "radio"++show n ] -- x ++ [tr_ [] [td_ [] [], td_ [] [input_ [type_ "radio", id_ "shuffle", onClick (From Nothing), checked_ $ from mdl == Nothing], -- label_ [for_ "shuffle"] [text "shuffle the player list before the game"]]]] ,--- div_ [] [text $ "Rules"],--- div_ [] [input_ [type_ "text", onInput (UpdateRule . head . (++[rule mdl]) . map fst . reads . S.unpack), value_ $ S.pack $ show $ rule mdl, style_ $ M.fromList [("width","70%")]]],- let mkTR label updater access = tr_ [] [ td_ [] [text label], td_ [] [ input_ [type_ "text", onInput (UpdateRule . updater . head . (++[access $ rule mdl]) . map fst . reads . S.unpack), value_ $ S.pack $ show $ access $ rule mdl] ] ] in- table_ [] [+ table_ [solid] [ caption_ [] [text "Rules"], mkTR "Number of lives" (\n -> (rule mdl){numBlackTokens=n}) numBlackTokens, mkTR "Number of colors" (\n -> (rule mdl){numColors=n}) numColors,
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.4.0.0+version: 0.4.0.1 -- A short (one-line) description of the package. synopsis: Hanabi card game