haskellscrabble 1.2.1 → 1.2.2
raw patch · 2 files changed
+4/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
haskellscrabble.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: haskellscrabble-version: 1.2.1+version: 1.2.2 synopsis: A scrabble library capturing the core game logic of scrabble. description: A scrabble library which enforces legal transitions between moves. Intended to facilitate the development of a playable game. homepage: http://www.github.com/happy0/haskellscrabble
src/Wordify/Rules/FormedWord.hs view
@@ -29,6 +29,7 @@ import qualified Data.Maybe as M import qualified Data.List.Split as S import Data.Char+ import Data.Functor data FormedWords = FirstWord FormedWord | FormedWords { main :: FormedWord@@ -52,7 +53,7 @@ denotePassThroughs placed formed = let breaks = brokenSquaresToChars $ S.split (splitter placed) formed in case breaks of- (part:parts) -> part ++ (concat $ Prelude.zipWith (++) (cycle ["(",")"]) parts)+ (part:parts) -> part ++ (Prelude.concat $ Prelude.zipWith (++) (cycle ["(",")"]) parts) [] -> "" squareToChar :: Square -> Char@@ -90,7 +91,7 @@ overallScore :: FormedWords -> Int overallScore formedWords = let wordsScore = Prelude.sum $ Prelude.map (scoreWord placed) $ allWords formedWords- in case (Prelude.length $ placed) of+ in case (Prelude.length $ keys $ placed) of 7 -> wordsScore + 50 _ -> wordsScore where