;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'chess-ply) (defvar chess-game-inhibit-events nil) (defconst chess-game-default-tags (byte-code "\300\301\302\303 B\304BBB\207" [("Event" . "Computer chess game") ("Round" . "-") "Site" system-name (("White" . "?") ("Black" . "?") ("Result" . "*") ("TimeControl" . "-"))] 4)) #@57 Return the event hooks associated with GAME. (fn GAME) (defalias 'chess-game-hooks #[257 "\211@\207" [] 2 (#$ . 372)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-hooks speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@60 Set the event hooks associated with GAME. (fn GAME HOOKS) (defalias 'chess-game-set-hooks #[514 "\240\207" [] 4 (#$ . 640)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-set-hooks speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@80 Add to GAME an event hook FUNCTION. (fn GAME FUNCTION &optional DATA PREPEND) (defalias 'chess-game-add-hook #[1026 "\211@\262\211\204BC\240\207\203 BB\240\207\211BC\244\207" [] 9 (#$ . 920)]) #@167 Remove from GAME all event hooks that match FUNCTION. If DATA is specified, only remove those hooks whose associated data matches. (fn GAME FUNCTION &optional DATA) (defalias 'chess-game-remove-hook #[770 "\211@\262\211\300\203<@@=\2032\203@A=\2032\211\203+\211A\241\210\2025A\262\2025\262A\262\202\240\207" [nil] 10 (#$ . 1140)]) #@66 Run the event hooks of GAME and pass ARGS. (fn GAME &rest ARGS) (defalias 'chess-game-run-hooks #[385 "?\205)\301\211@\262\211\203$\211@\302@A$\262A\266\202\202 \262\262\207" [chess-game-inhibit-events nil apply] 10 (#$ . 1507)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-run-hooks speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@56 Return the tags alist associated with GAME. (fn GAME) (defalias 'chess-game-tags #[257 "\211A@\207" [] 2 (#$ . 1907)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-tags speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@121 Set the tags alist associated with GAME. After the TAGS alist was set the 'set-tags event is triggered. (fn GAME TAGS) (defalias 'chess-game-set-tags #[514 "A\240\210\301C?\2051\302\211@\262\211\203,\211@\303@A$\262A\266\202\202\262\262\207" [chess-game-inhibit-events set-tags nil apply] 12 (#$ . 2175)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-set-tags speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@50 Return the value for TAG in GAME. (fn GAME TAG) (defalias 'chess-game-tag #[514 "\211A@\262\211\205\300\"A\207" [assoc] 6 (#$ . 2654)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-tag speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@49 Set TAG for GAME to VALUE. (fn GAME TAG VALUE) (defalias 'chess-game-set-tag #[771 "\211A@\262\211\204EBCA\240\210\301C?\205@\302\211@\262\211\203;\211@\303@A$\262A\266\202\202\"\262\262\266\202]\304\"\211\203U\211\241\266\202]BC\244\266\305D?\205\212\302\211@\262\211\203\205\211@\303@A$\262A\266\202\202l\262\262\207" [chess-game-inhibit-events set-tags nil apply assoc set-tag] 16 (#$ . 2943)]) #@38 Delete TAG from GAME. (fn GAME TAG) (defalias 'chess-game-del-tag #[514 "\301\211A@\262\"A\240\210\302C?\205;\303\211@\262\211\2036\211@\304@A$\262A\266\202\202\262\262\266\305D?\205j\303\211@\262\211\203e\211@\304@A$\262A\266\202\202L\262\262\207" [chess-game-inhibit-events assq-delete-all set-tags nil apply delete-tag] 14 (#$ . 3405)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-del-tag speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@56 Return the data alist associated with GAME. (fn GAME) (defalias 'chess-game-data-alist #[257 "\3008\207" [2] 3 (#$ . 3941)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-data-alist speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@59 Set the data alist associated with GAME. (fn GAME VALUE) (defalias 'chess-game-set-data-alist #[514 "AA\240\207" [] 4 (#$ . 4221)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-set-data-alist speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@50 Set GAME data KEY to VALUE. (fn GAME KEY VALUE) (defalias 'chess-game-set-data #[771 "\3018\262\236\211\203\211\241\210\2021\204$AABC\240\210\2021BB\262AA\240\210\302D?\205^\303\211@\262\211\203Y\211@\304@A$\262A\266\202\202@\262\262\266\207" [chess-game-inhibit-events 2 set-data nil apply] 15 (#$ . 4513)]) #@51 Return the value of GAME data KEY. (fn GAME KEY) (defalias 'chess-game-data #[514 "\3008\262\211\205\236A\207" [2] 5 (#$ . 4871)]) #@51 Delete KEY from GAME's data alist. (fn GAME KEY) (defalias 'chess-game-del-data #[514 "\3008\262\211\205\301\"\207" [2 assq-delete-all] 6 (#$ . 5016)]) #@66 Return the main variation of GAME as a list of plies. (fn GAME) (defalias 'chess-game-plies #[257 "\3008\207" [3] 3 (#$ . 5182)]) (byte-code "\300\301\302\303#\304\301\305\306#\210\307\310\301\"\207" [function-put chess-game-plies speed -1 put byte-optimizer byte-compile-inline-expand defalias chess-game-main-var] 5) #@85 Set the list of plies which represents the main variation of GAME. (fn GAME PLIES) (defalias 'chess-game-set-plies #[514 "AA\205 C\241\210\301D?\2058\302\211@\262\211\2033\211@\303@A$\262A\266\202\202\262\262\207" [chess-game-inhibit-events setup-game nil apply] 12 (#$ . 5509)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-set-plies speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@55 Set the initial POSITION of GAME. (fn GAME POSITION) (defalias 'chess-game-set-start-position #[514 "\211\301!\205 \211G\302U\262\204\303\304\305\306E\"\210\211C\262CAA\205(C\241\210\307D?\205W\310\211@\262\211\203R\211@\311@A$\262A\266\202\2029\262\262\207" [chess-game-inhibit-events vectorp 75 signal wrong-type-argument chess-pos position setup-game nil apply] 14 (#$ . 5966)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-set-start-position speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@96 Return the current position of GAME or a position of a given INDEX. (fn GAME &optional INDEX) (defalias 'chess-game-pos #[513 "\300\"\211\211:\205\211@\301!\205\211G\302U\262\262\204%\303\304\305\306E\"\210\211@\207" [chess-game-ply vectorp 75 signal wrong-type-argument chess-ply ply] 8 (#$ . 6542)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-pos speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@135 Return a symbol, such as :checkmate, :resign, etc. This conveys the status of the game at the given INDEX. (fn GAME &optional INDEX) (defalias 'chess-game-status #[513 "\300\"\211\211:\205\211@\301!\205\211G\302U\262\262\204'\303\304\305\306E\"\210\211@\266\203\211\301!\2056\211G\302U\262\204C\303\304\307\310E\"\210\211\311H\262\206\254\300\"\312\313\314\315\316\317\320&\206\252\211\211\211:\205q\211@\301!\205o\211G\302U\262\262\204~\303\304\305\306E\"\210\211@\262\211\301!\205\215\211G\302U\262\204\232\303\304\307\310E\"\210\211\321H\262\211\205\250\312\322\323#\262\262\207" [chess-game-ply vectorp 75 signal wrong-type-argument chess-ply ply chess-pos position 69 chess-ply-any-keyword :drawn :perpetual :repetition :flag-fell :resign :aborted 74 :stalemate :checkmate] 11 (#$ . 7003)]) #@54 Return the GAME's current position index. (fn GAME) (defalias 'chess-game-index #[257 "\211\3008\262GS\207" [3] 4 (#$ . 7849)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-index speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@46 Return the current GAME sequence. (fn GAME) (defalias 'chess-game-seq #[257 "\300\211\3018\262GS\262\\\300\245\207" [2 3] 6 (#$ . 8128)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-seq speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@122 Return the color whose move it is in GAME at INDEX (or at the last position if INDEX is nil). (fn GAME &optional INDEX) (defalias 'chess-game-side-to-move #[513 "\300\"\211\211:\205\211@\301!\205\211G\302U\262\262\204'\303\304\305\306E\"\210\211@\266\203\211\301!\2056\211G\302U\262\204C\303\304\307\310E\"\210\211\311H\207" [chess-game-ply vectorp 75 signal wrong-type-argument chess-ply ply chess-pos position 70] 10 (#$ . 8418)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-side-to-move speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@100 Return a ply of GAME. If INDEX is nil, the last played ply is returned. (fn GAME &optional INDEX) (defalias 'chess-game-ply #[513 "\211\203 \211\3008\2628\207\301\3008\262!@\207" [3 last] 6 (#$ . 9026)]) #@55 Add PLY to the main variation of GAME. (fn GAME PLY) (defalias 'chess-game-add-ply #[514 "\3018\262\211\203\211C\244\207\302CAA\205C\241\210\303D?\205L\304\211@\262\211\203G\211@\305@A$\262A\266\202\202.\262\262\266\204)\207" [chess-game-inhibit-events 3 t setup-game nil apply] 15 (#$ . 9244)]) (chess-message-catalog 'english '((undo-limit-reached . "Cannot undo further") (add-to-completed . "Cannot add moves to a completed game"))) #@53 Undo the last COUNT plies of GAME. (fn GAME COUNT) (defalias 'chess-game-undo #[514 "\211\211\3018\262GS\262V\203\302\303\304\305\306#!\266\307\310\3018\262\"AA\2050C\241\210\311D?\205_\303\211@\262\211\203Z\211@\305@A$\262A\266\202\202A\262\262\266)\312D?\205\217\303\211@\262\211\203\212\211@\305@A$\262A\266\202\202q\262\262\207" [chess-game-inhibit-events 3 undo-limit-reached nil error apply chess-string t nbutlast setup-game post-undo] 14 (#$ . 9721)]) #@55 Strip all annotations from the given GAME. (fn GAME) (defalias 'chess-game-strip-annotations #[257 "\211\211\3008\262GS\262\301\211W\205r\211\302\"\211\211:\205-\211@\303!\205+\211G\304U\262\262\204:\305\306\307\310E\"\210\211@\266\203\211\311\303!\205K\211G\304U\262\204X\305\306\312\313E\"\210\211<\204e\305\306\314\315E\"\210\316I\266\211T\262\202\f\207" [3 0 chess-game-ply vectorp 75 signal wrong-type-argument chess-ply ply nil chess-pos position list annotations 71] 12 (#$ . 10246)]) #@60 Return non-nil if GAME is at a final positionn. (fn GAME) (defalias 'chess-game-over-p #[257 "\300\3018\302\"@\211\205i\211\303\304\305\306\307\310\311&\206g\211\211\211:\205.\211@\312!\205,\211G\313U\262\262\204;\314\315\316\317E\"\210\211@\262\211\312!\205J\211G\313U\262\204W\314\315\320\321E\"\210\211\322H\262\211\205e\303\323\324#\262\262\207" [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] 11 (#$ . 10774)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-over-p speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@22 (fn GAME NEW-GAME) (defalias 'chess-game-copy-game #[514 "\211A@\262A\240\210\301C?\2058\302\211@\262\211\2033\211@\303@A$\262A\266\202\202\262\262\266\3048\262AA\205JC\241\210\305D?\205y\302\211@\262\211\203t\211@\303@A$\262A\266\202\202[\262\262\207" [chess-game-inhibit-events set-tags nil apply 3 setup-game] 14 (#$ . 11502)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put chess-game-copy-game speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@263 Create a new chess game object. Optionally use the given starting POSITION (see also `chess-game-set-start-position'). TAGS is the starting set of game tags (which can always be changed later using the various tag-related methods). (fn &optional POSITION TAGS) (defalias 'chess-game-create #[512 "\302\302\206\211\303!\205\211G\304U\262\204 \305\306\307\310E\"\210\211C\262CF\311\312\313!B B\211\203Y\211@@\211A@\262\211\205E\314\"A\266\203\204R\315@A#\210A\266\202\202-\210\207" [chess-starting-position chess-game-default-tags nil vectorp 75 signal wrong-type-argument chess-pos position "Date" format-time-string "%Y.%m.%d" assoc chess-game-set-tag] 11 (#$ . 12040)]) #@246 Make a move in the current GAME using PLY. This creates a new position and adds it to the main variation. The 'changes' of the last ply reflect whether the game is currently in progress (nil), if it is drawn, resigned, mate, etc. (fn GAME PLY) (defalias 'chess-game-move #[514 "\301!\211\211:\205\211@\302!\205\211G\303U\262\262\204%\304\305\306\307E\"\210\211A\262\310\311\312\313\314\315\316&\206\205\211\211\211:\205L\211@\302!\205J\211G\303U\262\262\204Y\304\305\306\307E\"\210\211@\262\211\302!\205h\211G\303U\262\204u\304\305\317\320E\"\210\211\321H\262\211\205\203\310\322\323#\262\262\203\225\324\325\326\327\330#!\266\211:\205\253\211@\302!\205\251\211G\303U\262\262\204\270\304\305\306\307E\"\210\211<\204\305\304\305\331\332E\"\210\241\266\310\311\312\313\315\316\314&\204\346\333\211\211:\205\356\211@\302!\205\354\211G\303U\262\262\204\373\304\305\306\307E\"\210\334\335\"\206\306\327\336\211\211:\205\211@\302!\205\211G\303U\262\262\204&\304\305\306\307E\"\210\211@\262\211\302!\2055\211G\303U\262\204B\304\305\317\320E\"\210\337!\211\340\211\302!\205S\211G\303U\262\204`\304\305\317\320E\"\210\211\341H\262!\302!\205q\211G\303U\262\204~\304\305\317\320E\"\210\211<\204\213\304\305\331\342E\"\210\341I\266\262\211\211:\205\250\211@\302!\205\246\211G\303U\262\262\204\265\304\305\306\307E\"\210\211A\262#\343\"\210\344\335#\262\262\211\302!\205\323\211G\303U\262\204\340\304\305\317\320E\"\210\211C\262\"\210\211G\345V\211\203n\310\315\323#\203n\325\301\"\211\211:\205\211@\302!\205\211G\303U\262\262\204\304\305\306\307E\"\210\211@\266\203\211\302!\205.\211G\303U\262\204;\304\305\317\320E\"\210\211\346H\266\203\310\315\314#\203[\347\350\203T\351\202U\352#\266\202\203\347\350\203g\352\202h\351#\266\202\203\211\203\202\310\311\312\313\322%\203\202\347\350\353#\210\210\334\315\"\203\267\354C?\205\266\325\211@\262\211\203\261\211@\327@A$\262A\266\202\202\230\262\262\207\355D?\205\344\325\211@\262\211\203\337\211@\327@A$\262A\266\202\202\306\262\262\207" [chess-game-inhibit-events chess-game-ply vectorp 75 signal wrong-type-argument chess-ply ply chess-ply-any-keyword :drawn :perpetual :repetition :flag-fell :resign :aborted chess-pos position 74 :stalemate :checkmate add-to-completed nil error apply chess-string list changes chess-game-add-ply chess-ply-keyword :next-pos chess-pos-move vconcat copy-alist 71 annotations chess-pos-set-preceding-ply chess-ply-set-keyword 2 70 chess-game-set-tag "Result" "0-1" "1-0" "1/2-1/2" resign move] 19 (#$ . 12745)]) #@57 End GAME, by resignation, draw, etc. (fn GAME KEYWORD) (defalias 'chess-game-end #[514 "\300\211\301\302\"\211\211:\205\211@\303!\205\211G\304U\262\262\204)\305\306\307\310E\"\210\211@\266\203D\"\207" [chess-game-move nil chess-game-ply vectorp 75 signal wrong-type-argument chess-ply ply] 12 (#$ . 15439)]) (byte-code "\300\301\302\303#\304\301\305\306#\210\307\310!\207" [function-put chess-game-end speed -1 put byte-optimizer byte-compile-inline-expand provide chess-game] 5)