;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\310\311\312\313\314\301%\210\315\316\317\320\321DD\322\323\324%\207" [require chess chess-algebraic chess-database chess-display chess-engine chess-game chess-random custom-declare-group chess-puzzle nil "A mode for playing games from a database of puzzles." :group custom-declare-variable chess-puzzle-auto-next funcall function #[0 "\300\207" [nil] 1] "If non-nil, move to the next puzzle once the position is won." :type boolean] 6) (defvar chess-puzzle-indices nil) (defvar chess-puzzle-position nil) (byte-code "\300\301!\210\300\302!\210\303\304\305\"\207" [make-variable-buffer-local chess-puzzle-indices chess-puzzle-position chess-message-catalog english ((bad-game-read . "Error reading game at position %d") (end-of-puzzles . "There are no more puzzles in this collection"))] 3) #@236 Pick a random puzzle from FILE, and solve it against the default engine. The spacebar in the display buffer is bound to `chess-puzzle-next', making it easy to go on to the next puzzle once you've solved one. (fn FILE &optional INDEX) (defalias 'chess-puzzle #[513 "\304!\211\205 \305 \211@A@\205\261\203\306\307\310#\210r\211q\210\311\312\310!\313#\210\2035\314\312\310!\315#\210\316\317 \320\321#\210\316\317 \322\323#\210\324!\325\310\"\211\326\211W\203a\211 \211I\266\211T\262\202M\266\327\330!\210\331 !\210\326\210\312!\332C\204{\333\334!\210 ?\205\254\310\211\204\212\333\334!\210\211@\262\211\203\247\211@\335@A$\262A\266\202\202\216\262\262\266\321 )\207" [chess-puzzle-auto-next chess-puzzle-indices chess-puzzle-position chess-game-inhibit-events chess-database-open chess-session chess-engine-set-option resign nil chess-game-set-data chess-display-game database chess-game-add-hook chess-puzzle-handler define-key current-local-map [32] chess-puzzle-next [63] chess-puzzle-show-solution chess-database-count make-vector 0 random t chess-shuffle-vector disable-autosave cl--assertion-failed game apply] 16 (#$ . 982) "fRead chess puzzles from: "]) #@60 Play the next puzzle in the collection, selected randomly. (defalias 'chess-puzzle-next #[0 "\304\305!\306\307\"\305 GU\203\310\305\311\312\313#!\207T\314 H\"\211\262\2046\315 HC\316\312\313#!\207\317\305\320#\210\321\322\320\204J\323\324!\210\204T\323\324!\210\325\"\211\211:\205l\211@\326!\205j\211G\327U\262\262\204y\330\331\332\333E\"\210\211@\266\203\211\326!\205\210\211G\327U\262\204\225\330\331\334\335E\"\210\211\336H\266\203#\210\337\211\203\265\211@\321\306\"#\210A\266\202\202\235\210\305\340C\204\303\323\324!\210 ?\205\364\305\211\204\322\323\324!\210\211@\262\211\203\357\211@\312@A$\262A\266\202\202\326\262\262\266\202)\207" [chess-puzzle-position chess-puzzle-indices chess-display-handling-event chess-game-inhibit-events chess-display-game nil chess-game-data database end-of-puzzles message apply chess-string chess-database-read bad-game-read error chess-display-set-game 0 chess-game-set-data my-color cl--assertion-failed game chess-game-ply vectorp 75 signal wrong-type-argument chess-ply ply chess-pos position 70 (database database-index database-count) orient] 17 (#$ . 2194) nil]) (defalias 'chess-puzzle-show-solution #[0 "\300\301!\211\2059\211\302\204\303\304!\210\305\"\211\211:\205)\211@\306!\205'\211G\307U\262\262\2046\310\311\312\313E\"\210\211@\266\203\314\306!\205F\211G\307U\262\204S\310\311\315\316E\"\210\211\204[\303\317!\210\211\211\306!\205h\211G\307U\262\204u\310\311\315\316E\"\210\211\320H\262\236A\266\202\302\204\210\303\304!\210\305\"\211\211:\205\240\211@\306!\205\236\211G\307U\262\262\204\255\310\311\312\313E\"\210\211@\266\203\321\306!\205\275\211G\307U\262\204\312\310\311\315\316E\"\210\211\204\322\303\317!\210\211\211\306!\205\337\211G\307U\262\204\354\310\311\315\316E\"\210\211\320H\262\236A\266\202\204\375\211\2057\322\323\211\204\303\304!\210\211\211\204\303\304!\210\3248\262GS\262\302U\203#\325\202$\326\327@!\2035\330\331!P\2026\332$\266\202\207" [chess-display-game nil 0 cl--assertion-failed game chess-game-ply vectorp 75 signal wrong-type-argument chess-ply ply bm chess-pos position opcode 71 pv message "Best move %s %s%s" 3 "is" "would have been" chess-ply-to-algebraic ", predicted variation " chess-var-to-algebraic ""] 11 nil nil]) #@38 (fn GAME DISPLAY EVENT &rest ARGS) (defalias 'chess-puzzle-handler #[899 "\300=\205\204\211\204\301\302!\210\303\3048\305\"@\211\205x\211\306\307\310\311\312\313\314&\206v\211\211\211:\205=\211@\315!\205;\211G\316U\262\262\204J\317\320\321\322E\"\210\211@\262\211\315!\205Y\211G\316U\262\204f\317\320\323\324E\"\210\211\325H\262\211\205t\306\326\327#\262\262\266\202\205\204rq\210\330 )\207" [move cl--assertion-failed game last 3 2 chess-ply-any-keyword :drawn :perpetual :repetition :flag-fell :resign :aborted vectorp 75 signal wrong-type-argument chess-ply ply chess-pos position 74 :stalemate :checkmate chess-puzzle-next] 15 (#$ . 4552)]) (provide 'chess-puzzle)