Server IP : 111.118.215.189 / Your IP : 3.128.31.200 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/emacs/24.3/lisp/play/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:36 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/play/mpuz.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314\315\306\301&\210\310\316\317\320\314\321\306\301&\210\310\322\302\323\314\321\306\301&\210\324\325\326\327\306\301%\210\324\330\331\332\306\301%\210\324\333\334\335\306\301%\210\324\336\337\340\306\301%\210\310\341\302\342\314\343\306\301&\207" [custom-declare-group mpuz nil "Multiplication puzzle." :prefix "mpuz-" :group games custom-declare-variable mpuz-silent 'error "Set this to nil if you want dings on inputs.\nThe value t means never ding, and `error' means only ding on wrong input." :type (choice (const :tag "No" nil) (const :tag "Yes" t) (const :tag "If correct" error)) mpuz-solve-when-trivial t "Solve any row that can be trivially calculated from what you've found." boolean mpuz-allow-double-multiplicator "Allow 2nd factors like 33 or 77." custom-declare-face mpuz-unsolved ((default :weight bold) (((class color)) :foreground "red1")) "Face for letters to be solved." mpuz-solved ((default :weight bold) (((class color)) :foreground "green1")) "Face for solved digits." mpuz-trivial ((default :weight bold) (((class color)) :foreground "blue")) "Face for trivial digits solved for you." mpuz-text ((t :inherit variable-pitch)) "Face for text on right." mpuz-mode-hook "Hook to run upon entry to mpuz." hook] 8) #@37 Local keymap to use in Mult Puzzle. (defvar mpuz-mode-map (byte-code "\301 \302\303\304\"\210\305\306\307#\210\305\310\311#\210)\207" [map make-sparse-keymap mapc #[(ch) "\302\303 !\304#\207" [map ch define-key char-to-string mpuz-try-letter] 4] "abcdefghijABCDEFGHIJ" define-key "" mpuz-offer-abort "?" describe-mode] 4) (#$ . 1858)) #@456 Multiplication puzzle mode. You have to guess which letters stand for which digits in the multiplication displayed inside the `*Mult Puzzle*' buffer. You may enter a guess for a letter's value by typing first the letter, then the digit. Thus, to guess that A=3, type `A 3'. To leave the game to do other editing work, just switch buffers. Then you may resume the game with M-x mpuz. You may abort a game by typing \<mpuz-mode-map>\[mpuz-offer-abort]. (defalias 'mpuz-mode #[nil "\304 \210\305\306\307\310!\210\311\312!\207" [major-mode mode-name tab-width mpuz-mode-map kill-all-local-variables mpuz-mode "Mult Puzzle" 30 use-local-map run-mode-hooks mpuz-mode-hook] 2 (#$ . 2206) nil]) #@40 Number of errors made in current game. (defvar mpuz-nb-errors 0 (#$ . 2907)) #@28 Number of games completed. (defvar mpuz-nb-completed-games 0 (#$ . 2990)) #@42 Number of errors made in previous games. (defvar mpuz-nb-cumulated-errors 0 (#$ . 3070)) #@42 True if a game is currently in progress. (defvar mpuz-in-progress nil (#$ . 3165)) #@54 A vector recording which digits have been decrypted. (defvar mpuz-found-digits (make-bool-vector 10 nil) (#$ . 3254)) #@59 A vector recording which digits have been solved for you. (defvar mpuz-trivial-digits (make-bool-vector 10 nil) (#$ . 3378)) (defalias 'mpuz-digit-solved-p '(macro . #[(digit) "\301\302\303E\302\304EE\207" [digit or aref mpuz-found-digits mpuz-trivial-digits] 5])) #@38 A permutation from [0..9] to [0..9]. (defvar mpuz-digit-to-letter (make-vector 10 0) (#$ . 3651)) #@40 The inverse of `mpuz-digit-to-letter'. (defvar mpuz-letter-to-digit (make-vector 10 0) (#$ . 3755)) (defalias 'mpuz-to-digit '(macro . #[(letter) "\301\302E\207" [letter aref mpuz-letter-to-digit] 3])) (defalias 'mpuz-to-letter '(macro . #[(digit) "\301\302E\207" [digit aref mpuz-digit-to-letter] 3])) #@53 Initialize puzzle coding with a random permutation. (defalias 'mpuz-build-random-perm #[nil "\305\306\307\310\311\312\313\314\315\316\257\n\317\320\n\2050 \321 !\n8\322\n\" S I\210\f I\210\202 +\207" [elem index letters mpuz-digit-to-letter mpuz-letter-to-digit 0 1 2 3 4 5 6 7 8 9 10 nil random delq] 10 (#$ . 4066)]) #@73 The board associates to any digit the list of squares where it appears. (defvar mpuz-board (make-vector 10 nil) (#$ . 4402)) #@68 Put (last digit of) NUMBER on ROW and COLUMNS of the puzzle board. (defalias 'mpuz-put-number-on-board #[(number row &rest columns) "\306 \306\211\205) @\f\307\246\f\307\245 \nB HBI\210A\211\204\n \306+\207" [digit columns column --dolist-tail-- number mpuz-board nil 10 row] 6 (#$ . 4533)]) #@62 Check whether all digits have been solved. Return t if yes. (defalias 'mpuz-check-all-solved #[(&optional row col) "\300\301\215\207" [solved (byte-code "\306\211\211\211\211\211\211\203\370 \204\370 \206! \307\310\311\"\f\206* \307\310\312\" \2062 \307\313!\206; \307\314!\211\203I \203I \f\204Z \203g \204Z \203g \f\203g \315 \210\316 \210\317\320\321\"\202\365 \n\206n \307\322!\206v \307\323!\211\203\211 \n\203\211 \204\211 \315\313!\202\365 \203\241 \n=\204\241 \315\n\203\234 \323\202\235 \322!\202\365 \203\277 \f=\204\277 \315\203\265 \310\202\266 \323\205\273 \312\"\202\365 \203\335 \n=\204\335 \315\n\203\323 \310\202\324 \322\n\205\331 \311\"\202\365 \204\370 \f\203\352 \204\362 \203\370 \n\203\370 \315\314!\204 \316 \210\324\325\326\"\210.\321\207" [squares E D C B2 B1 nil mpuz-check-all-solved 4 7 9 10 2 mpuz-solve mpuz-paint-board throw solved t 8 6 mapc #[(digit) " H\206 \n H?\2055 H\211\2055 \203- \203'