Skip to content

Commit

Permalink
fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
mlang committed Jan 11, 2025
1 parent 52f000a commit 51df3b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ polyglot = testGroup "Polyglot" [

perftSuite :: TestTree
perftSuite = testGroup "PerftSuite" $ map f info where
f (fen, ds) = testGroup fen $ zipWith g [1..] ds where
g n d = testCase ("Depth=" ++ show n ++ ", Nodes=" ++ show d) $
perft n <$> fromFEN fen @?= Just d
f (fen, ns) = testGroup fen $ zipWith g [1..] ns where
g d n = testCase ("Depth=" ++ show d ++ ", Nodes=" ++ show n) $
perft d <$> fromFEN fen @?= Just n
info = [
("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", [20, 400, 8902, 197281, 4865609, 119060324]),
("r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1", [48, 2039, 97862, 4085603, 193690690]),
Expand Down Expand Up @@ -158,4 +158,4 @@ type Nodes = Int

perft :: Depth -> Position -> Nodes
perft 1 p = Vector.length $ legalPlies' p
perft n p = Vector.sum $ Vector.map (perft (pred n) . unsafeDoPly p) (legalPlies' p)
perft d p = Vector.sum $ Vector.map (perft (pred d) . unsafeDoPly p) (legalPlies' p)

0 comments on commit 51df3b1

Please sign in to comment.