summaryrefslogtreecommitdiff
path: root/test/ArbitraryMove.hs
diff options
context:
space:
mode:
authorCamil Staps2017-11-26 13:35:48 +0100
committerCamil Staps2017-11-26 13:35:48 +0100
commit3b3752d5bd9c21f24072f6f6030938d85a48bc11 (patch)
tree4ec4a0b3856b9d985efde81e6c974ec18b54941e /test/ArbitraryMove.hs
parentAdd Markov chain test (diff)
Cleanup
Diffstat (limited to 'test/ArbitraryMove.hs')
-rw-r--r--test/ArbitraryMove.hs12
1 files changed, 2 insertions, 10 deletions
diff --git a/test/ArbitraryMove.hs b/test/ArbitraryMove.hs
index e786a68..4c6fb48 100644
--- a/test/ArbitraryMove.hs
+++ b/test/ArbitraryMove.hs
@@ -19,15 +19,7 @@ instance Arbitrary Board where arbitrary = return defaultBoard
type Move = String
arbitraryMove :: Gen Move
-arbitraryMove = frequency
- [ (2, probableArbitraryMove)
- --, (1, invalidMove)
- ]
- where
- invalidMove :: Gen Move
- invalidMove = oneof
- [ liftM2 (\r c -> [r,c]) (choose ('i', 'z')) (elements "09")
- ]
+arbitraryMove = probableArbitraryMove
instance Arbitrary PGN
where
@@ -69,7 +61,7 @@ instance Arbitrary PGN
- on a set of PGN games, e.g. from http://theweekinchess.com/twic.
-}
-probableArbitraryMove :: Gen String
+probableArbitraryMove :: Gen Move
probableArbitraryMove = frequency $ map (return <$>)
[ (8, "a1=B")
, (2, "a1=B+")