Skip to content

Commit 9f8f37a

Browse files
committed
Refactoring
1 parent 1747d9b commit 9f8f37a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

test/clj_chess/perft_test.clj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@
2424

2525
(deftest perft-test
2626
(testing "Default fen"
27-
(is (= (let [state (fen->state "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1")]
28-
(mapv #(perft state %) [1 2 3]))
27+
(is (let [state (fen->state "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1")]
28+
(= (mapv #(perft state %) [1 2 3]))
2929
[20 400 8902])))
3030
(testing "Kiwipete"
31-
(is (= (let [state (fen->state "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1")]
32-
(mapv #(perft state %) [1 2 3]))
31+
(is (let [state (fen->state "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1")]
32+
(= (mapv #(perft state %) [1 2 3]))
3333
[48 2039 97862])))
3434
(testing "Position 3"
35-
(is (= (let [state (fen->state "8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1")]
36-
(mapv #(perft state %) [1 2 3 4]))
35+
(is (let [state (fen->state "8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1")]
36+
(= (mapv #(perft state %) [1 2 3 4]))
3737
[14 191 2812 43238])))
3838
(testing "Position 4"
39-
(is (= (let [state (fen->state "r3k2r/Pppp1ppp/1b3nbN/nP6/BBP1P3/q4N2/Pp1P2PP/R2Q1RK1 w kq - 0 1")]
40-
(mapv #(perft state %) [1 2 3]))
39+
(is (let [state (fen->state "r3k2r/Pppp1ppp/1b3nbN/nP6/BBP1P3/q4N2/Pp1P2PP/R2Q1RK1 w kq - 0 1")]
40+
(= (mapv #(perft state %) [1 2 3]))
4141
[6 264 9467])))
4242
(testing "Position 5"
43-
(is (= (let [state (fen->state "rnbq1k1r/pp1Pbppp/2p5/8/2B5/8/PPP1NnPP/RNBQK2R w KQ - 1 8")]
44-
(mapv #(perft state %) [1 2 3]))
43+
(is (let [state (fen->state "rnbq1k1r/pp1Pbppp/2p5/8/2B5/8/PPP1NnPP/RNBQK2R w KQ - 1 8")]
44+
(= (mapv #(perft state %) [1 2 3]))
4545
[44 1486 62379])))
4646
(testing "Position 6"
47-
(is (= (let [state (fen->state "r4rk1/1pp1qppp/p1np1n2/2b1p1B1/2B1P1b1/P1NP1N2/1PP1QPPP/R4RK1 w - - 0 10")]
48-
(mapv #(perft state %) [1 2 3]))
47+
(is (let [state (fen->state "r4rk1/1pp1qppp/p1np1n2/2b1p1B1/2B1P1b1/P1NP1N2/1PP1QPPP/R4RK1 w - - 0 10")]
48+
(= (mapv #(perft state %) [1 2 3]))
4949
[46 2079 89890]))))
5050

5151
(run-tests)

0 commit comments

Comments
 (0)