From a08a970aaa21c52ea038054a1933c48f3d4f9cfc Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 25 Apr 2002 21:18:52 +0000 Subject: *** no comment *** --- chess-display.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chess-display.el b/chess-display.el index d5c5227..f38fc7a 100644 --- a/chess-display.el +++ b/chess-display.el @@ -999,6 +999,7 @@ to the end or beginning." (chess-message-catalog 'english '((cannot-mount . "You cannot move pieces on top of each other") (move-not-legal . "That is not a legal move") + (not-your-move . "It is not your turn to move") (wrong-color . "You cannot move your opponent's pieces") (selected-empty . "You cannot select an empty square") (piece-immobile . "That piece cannot move now"))) @@ -1047,6 +1048,12 @@ Clicking once on a piece selects it; then click on the target location." (cond ((eq piece ? ) (throw 'message (chess-string 'selected-empty))) + ((not (or chess-display-edit-mode + (not (chess-display-active-p)) + (eq (chess-pos-side-to-move position) + (chess-game-data chess-module-game + 'my-color)))) + (throw 'message (chess-string 'not-your-move))) ((and (not chess-display-edit-mode) (if (chess-pos-side-to-move position) (> piece ?a) -- cgit v1.2.3