  let ms = readState fen
   in case ms of
        Right s -> map (\n -> (length (perft s n))) depths
        Left _  -> []

main :: IO ()
main =
  hspec $ do
    describe "perft" $ do
      it "handles chess960 position #11 from wiki" $
        perftLengths
          "qnr1bkrb/pppp2pp/3np3/5p2/8/P2P2P1/NPP1PP1P/QN1RBKRB w GDg - 3 9"
          [1 .. 3] `shouldBe`
        [33, 823, 26895]
      it "handles chess960 position #33 from wiki" $