packages feed

chesshs 0.1.1 → 0.2.0

raw patch · 2 files changed

+3/−6 lines, 2 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

Chess.hs view
@@ -76,13 +76,10 @@ 
 instance Show Board where
   show b = unlines [ [ tos (board b ! (x,y)) | x<-[0..7] ] | y<-[7,6..0]] where
-    tos p = fromMaybe ' ' (p >>= return . head . show)
+    tos p = fromMaybe '.' (p >>= return . head . show)
 
 otherColor x = if x == White then Black else White
 
-isLeft (Left _) = True
-isLeft _ = False
-
 posToStr (x,y) = [chr (x + 97), chr (y + 49)]
 
 -- |Takes a position like "a5" and returns the coordinates (0,4)
@@ -275,4 +272,4 @@           Nothing -> ""
         potentialMoves
           | length mv == 2 = map (\x -> posToStr x ++ mv ++ promoStr)
-          | length mv == 3 = map (\x -> posToStr x ++ tail mv ++ promoStr)+          | length mv == 3 = map (\x -> posToStr x ++ tail mv ++ promoStr)
chesshs.cabal view
@@ -1,5 +1,5 @@ Name:                chesshs-Version:             0.1.1+Version:             0.2.0 Synopsis:            Simple library for validating chess moves and parsing PGN files Description:         With this library you can load chess boards from FEN and PGN notation and apply moves to the boards. Moves will only be allowed if they are valid under the normal chess rules. License:             BSD3