;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require chess-common chess-fen chess-pgn] 2) (defvar chess-network-regexp-alist (byte-code "\301P\302B\303\304B\305\306B\307\310B\311\312B\313\314B\315\316B\317\320B\321\322B\323\324B\325\326B\327\330B\331\332B\333\334B\335\336B\337\340B\341\342B\343\344B\257\207" [chess-algebraic-regexp "$" #[0 "\301\302\303!\304\305\306\304!#\206\307\304\310\"\266\202\"\207" [chess-engine-response-handler move match-string 0 nil chess-algebraic-to-ply chess-engine-position chess-engine-command illegal] 8] "chess match\\(\\s-+\\(.+\\)\\)?$" #[0 "\301\302\303!\"\207" [chess-engine-response-handler match match-string 2] 4] "fen\\s-+\\(.+\\)" #[0 "\301\302\303!\304!\206\305\306C\307\310\311#!\266\262\"\207" [chess-engine-response-handler setup-pos match-string 1 chess-fen-to-pos nil invalid-fen message apply chess-string] 11] "pgn\\s-+\\(.+\\)" #[0 "\301\302\303\304!!\305!\206\306\307\306\310\311\312#!\266\262\"\207" [chess-engine-response-handler setup-game chess-network-parse-multiline match-string 1 chess-pgn-to-game nil invalid-pgn message apply chess-string] 11] "pass$" #[0 "\301!\207" [chess-engine-response-handler pass] 2] "quit$" #[0 "\301!\207" [chess-engine-response-handler quit] 2] "resign$" #[0 "\301!\207" [chess-engine-response-handler resign] 2] "draw$" #[0 "\301!\207" [chess-engine-response-handler draw] 2] "abort$" #[0 "\301!\207" [chess-engine-response-handler abort] 2] "takeback\\s-+\\([0-9]+\\)$" #[0 "\301\302\303\304!!\"\207" [chess-engine-response-handler undo string-to-number match-string 1] 5] "accept\\(\\s-+\\(.+\\)\\)?$" #[0 "\301\302\303!\"\207" [chess-engine-response-handler accept match-string 2] 4] "decline$" #[0 "\301!\207" [chess-engine-response-handler decline] 2] "retract$" #[0 "\301!\207" [chess-engine-response-handler retract] 2] "illegal$" #[0 "\301!\207" [chess-engine-response-handler illegal] 2] "flag$" #[0 "\301!\207" [chess-engine-response-handler call-flag] 2] "forfeit$" #[0 "\301!\207" [chess-engine-response-handler flag-fell] 2] "kibitz\\s-+\\(.+\\)$" #[0 "\301\302\303\304!!\"\207" [chess-engine-response-handler kibitz chess-network-parse-multiline match-string 1] 5] "chat\\s-+\\(.+\\)$" #[0 "\301\302\303\304!!\"\207" [chess-engine-response-handler chat chess-network-parse-multiline match-string 1] 5]] 19)) (chess-message-catalog 'english '((network-starting . "Starting network client/server...") (network-waiting . "Now waiting for your opponent to connect...") (takeback-sent . "Sent request to undo %d ply(s) to your opponent"))) #@12 (fn STR) (defalias 'chess-network-flatten-multiline #[257 "\300\301\"\203\302\303\304\211$\262\202\207" [string-match "\n" replace-match " " t] 6 (#$ . 2678)]) #@12 (fn STR) (defalias 'chess-network-parse-multiline #[257 "\300\301\"\203\302\303\304\211$\262\202\207" [string-match " " replace-match "\n" t] 6 (#$ . 2853)]) (make-variable-buffer-local 'chess-network-kind) #@66 Initialize the network chess engine. (fn GAME EVENT &rest ARGS) (defalias 'chess-network-handler #[642 "?\205\211\306\267\202\201\307\310\311!\312\313\312\314\315\316#!\266\317=\203D\320\321!\2034\321\322p\323\324\325!!#\202N\326\322p\327\330!\331\332\324\325!&\202N\333\322p\324\334!\324\325!$\262\211\317=\203\\\335\202]\336)\266\307\207\337C\204n\340\341!\210\f?\205\237\312\211\204}\340\341!\210\211@\262\211\203\232\211@\315@A$\262A\266\202\202\201\262\262\266 \335=\203\261\342\312\314\315\316#!\207\343\344\"\207\345\312\346\347\350@!\"\"\207\345\312\346\351\352\353@\312\307#!\"\"\207\345\312\354\"\207\345\312\355\"\207\344\345\312\346\356@\"\"\207 \203\357\357\312\360\"\210\361\345\312\362\"\207 \203\377\357\312\360\"\210\363\345\312\364\"\207 \203\357\312\360\"\210\365\211@A\345\312\346\366@\"\"\210\367@C\314\315\316#!\207\345\312@\2039\346\370@\"\202:\371\"\207\345\312\372\"\207\345\312\373\"\207\345\312\374\"\207\345\312\375\"\207\345\312\346\376\352@!\"\"\207\345\312\346\377\352@!\"\"\207\345\312\346\201B@\"\"\207\345\312\201C\"\210\201D\201E\"\207\315\201D$\207" [chess-engine-handling-event cursor-in-echo-area chess-engine-process chess-network-kind chess-game-inhibit-events chess-engine-pending-offer #s(hash-table size 19 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (initialize 11 ready 99 setup-pos 182 setup-game 193 pass 209 busy 214 match 219 draw 230 abort 246 undo 262 accept 298 decline 316 retract 321 illegal 326 call-flag 331 kibitz 336 chat 347 set-index 358 flag-fell 369)) t read-char "Are you the c)lient or s)erver? " nil network-starting message apply chess-string 115 fboundp open-network-stream-server "*chess-network*" string-to-number read-string "Port: " start-process executable-find "nc" "-l" "-p" open-network-stream "Host: " server client announce-autosave cl--assertion-failed game network-waiting chess-network-handler match chess-engine-send format "fen %s\n" chess-pos-to-fen "pgn %s\n" chess-network-flatten-multiline chess-game-to-pgn "pass\n" "playing\n" "chess match %s\n" chess-engine-command retract draw "draw\n" abort "abort\n" undo "takeback %d\n" takeback-sent "accept %s\n" "accept\n" "decline\n" "retract\n" "illegal\n" "flag\n" "kibitz %s\n" "chat %s\n" chess-full-name chess-engine-pending-arg "index %d\n" "forfeit\n" chess-common-handler flag-fell] 13 (#$ . 3075)]) (provide 'chess-network)