summaryrefslogtreecommitdiff
path: root/chess-perft.el
diff options
context:
space:
mode:
authorMario Lang <mlang@delysid.org>2014-06-04 22:43:13 +0200
committerMario Lang <mlang@delysid.org>2014-06-04 22:43:13 +0200
commitd3bd3c6f07e0c9a2a7a1488e43b47439a5f8ac54 (patch)
tree6880ccc0d0694bd1af272c90108d68d95b58791e /chess-perft.el
parent4f6e6e7cac21f21586b221e2a65e657a4c2a7213 (diff)
Sync from ELPA.
Diffstat (limited to 'chess-perft.el')
-rw-r--r--chess-perft.el15
1 files changed, 6 insertions, 9 deletions
diff --git a/chess-perft.el b/chess-perft.el
index 7dbc858..a24d584 100644
--- a/chess-perft.el
+++ b/chess-perft.el
@@ -1,6 +1,6 @@
;;; chess-perft.el --- Perft tests for emacs-chess -*- lexical-binding: t; -*-
-;; Copyright (C) 2014 Mario Lang
+;; Copyright (C) 2014 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Keywords: games
@@ -45,6 +45,7 @@
;;; Code:
+(require 'chess-display)
(require 'chess-fen)
(require 'chess-ply)
(require 'chess-pos)
@@ -185,32 +186,28 @@ If not called interactively the result is a list of the form
(should (equal (chess-perft position 5) '(674624 52051 1165 0 0 52950 0)))))
(ert-deftest chess-perft-pos4-depth1 ()
- (let ((chess-ply-allow-interactive-query nil)
- (position
+ (let ((position
(chess-fen-to-pos
"r3k2r/Pppp1ppp/1b3nbN/nP6/BBP1P3/q4N2/Pp1P2PP/R2Q1RK1 w kq -")))
(should (equal (chess-perft position 1) '(6 0 0 0 0 0 0)))))
(ert-deftest chess-perft-pos4-depth2 ()
:tags '(:capture :castle :promotion :check)
- (let ((chess-ply-allow-interactive-query nil)
- (position
+ (let ((position
(chess-fen-to-pos
"r3k2r/Pppp1ppp/1b3nbN/nP6/BBP1P3/q4N2/Pp1P2PP/R2Q1RK1 w kq -")))
(should (equal (chess-perft position 2) '(264 87 0 6 48 10 0)))))
(ert-deftest chess-perft-pos4-depth3 ()
:tags '(:capture :en-passant :promotion :check :checkmate)
- (let ((chess-ply-allow-interactive-query nil)
- (position
+ (let ((position
(chess-fen-to-pos
"r3k2r/Pppp1ppp/1b3nbN/nP6/BBP1P3/q4N2/Pp1P2PP/R2Q1RK1 w kq -")))
(should (equal (chess-perft position 3) '(9467 1021 4 0 120 38 22)))))
(ert-deftest chess-perft-pos4-depth4 ()
:tags '(:capture :castle :promotion :check :checkmate)
- (let ((chess-ply-allow-interactive-query nil)
- (position
+ (let ((position
(chess-fen-to-pos
"r3k2r/Pppp1ppp/1b3nbN/nP6/BBP1P3/q4N2/Pp1P2PP/R2Q1RK1 w kq -")))
(should (equal (chess-perft position 4) '(422333 131393 0 7795 60032 15492 5)))))