| Server IP : 217.160.0.135 / Your IP : 216.73.217.37 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/play/ |
Upload File : |
;ELC ;;; Compiled ;;; in Emacs version 28.2 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306\307\310\311&\210\312\313\314\315\316DD\317\320\321%\210\312\322\314\315\323DD\324\320\325%\210\312\326\314\315\327DD\330\320\331%\210\312\332\314\315\333DD\334\320\335%\210\312\336\314\315\337DD\340\320\341%\210\312\342\314\315\343DD\344\320\341%\210\312\345\314\315\346DD\347\320\341%\210\312\350\314\315\351DD\352\320\341%\210\312\353\314\315\354DD\355\320\356%\210\312\357\314\315\360DD\361\320\362%\210\312\363\314\315\364DD\365\320\366%\210\312\367\314\315\370DD\371\320\372%\210\312\373\314\315\374DD\375\320\376%\210\312\377\314\315\201@ DD\201A \320\201B %\210\312\201C \314\315\201D DD\201E \320\201F %\210\312\201G \314\315\201H DD\201I \320\201J %\207" [require gamegrid custom-declare-group pong nil "Emacs Lisp implementation of the classical game pong." :tag "Pong" :group games custom-declare-variable pong-buffer-name funcall function #[0 "\300\207" ["*Pong*"] 1 #1=""] "Name of the buffer used to play." :type (string) pong-width #[0 "\300\207" [50] 1 #1#] "Width of the playfield." (integer) pong-height #[0 "\300\301 \302Z^\207" [30 frame-height 6] 3 #1#] "Height of the playfield." (integer) pong-bat-width #[0 "\300\207" [3] 1 #1#] "Width of the bats for pong." (integer) pong-blank-color #[0 "\300\207" ["black"] 1 #1#] "Color used for background." color pong-bat-color #[0 "\300\207" ["yellow"] 1 #1#] "Color used for bats." pong-ball-color #[0 "\300\207" ["red"] 1 #1#] "Color used for the ball." pong-border-color #[0 "\300\207" ["white"] 1 #1#] "Color used for pong borders." pong-left-key #[0 "\300\207" ["4"] 1 #1#] "Alternate key to press for bat 1 to go up (primary one is [left])." (restricted-sexp :match-alternatives (stringp vectorp)) pong-right-key #[0 "\300\207" ["6"] 1 #1#] "Alternate key to press for bat 1 to go down (primary one is [right])." (restricted-sexp :match-alternatives (stringp vectorp)) pong-up-key #[0 "\300\207" ["8"] 1 #1#] "Alternate key to press for bat 2 to go up (primary one is [up])." (restricted-sexp :match-alternatives (stringp vectorp)) pong-down-key #[0 "\300\207" ["2"] 1 #1#] "Alternate key to press for bat 2 to go down (primary one is [down])." (restricted-sexp :match-alternatives (stringp vectorp)) pong-quit-key #[0 "\300\207" ["q"] 1 #1#] "Key to press to quit pong." (restricted-sexp :match-alternatives (stringp vectorp)) pong-pause-key #[0 "\300\207" ["p"] 1 #1#] "Key to press to pause pong." (restricted-sexp :match-alternatives (stringp vectorp)) pong-resume-key #[0 "\300\207" ["p"] 1 #1#] "Key to press to resume pong." (restricted-sexp :match-alternatives (stringp vectorp)) pong-timer-delay #[0 "\300\207" [0.1] 1 #1#] "Time to wait between every cycle." number] 8) (defvar pong-blank-options '(((glyph colorize) (t 32)) ((color-x color-x) (mono-x grid-x) (color-tty color-tty)) (((glyph color-x) [0 0 0]) (color-tty pong-blank-color)))) (defvar pong-bat-options '(((glyph colorize) (emacs-tty 79) (t 32)) ((color-x color-x) (mono-x mono-x) (color-tty color-tty) (mono-tty mono-tty)) (((glyph color-x) [1 1 0]) (color-tty pong-bat-color)))) (defvar pong-ball-options '(((glyph colorize) (t 42)) ((color-x color-x) (mono-x grid-x) (color-tty color-tty)) (((glyph color-x) [1 0 0]) (color-tty pong-ball-color)))) (defvar pong-border-options '(((glyph colorize) (t 43)) ((color-x color-x) (mono-x grid-x) (color-tty color-tty)) (((glyph color-x) [0.5 0.5 0.5]) (color-tty pong-border-color)))) (defconst pong-blank 0) (defconst pong-bat 1) (defconst pong-ball 2) (defconst pong-border 3) #@31 Horizontal speed of the ball. (defvar pong-xx nil (#$ . 3601)) #@29 Vertical speed of the ball. (defvar pong-yy nil (#$ . 3670)) #@34 Horizontal position of the ball. (defvar pong-x nil (#$ . 3737)) #@32 Vertical position of the ball. (defvar pong-y nil (#$ . 3808)) #@29 Vertical position of bat 1. (defvar pong-bat-player1 nil (#$ . 3877)) #@29 Vertical position of bat 2. (defvar pong-bat-player2 nil (#$ . 3953)) (defvar pong-score-player1 nil) (defvar pong-score-player2 nil) #@24 Modemap for pong-mode. (defvar pong-mode-map (byte-code "\306\307!\310\311\312#\210\310\313\314#\210\310\315\316#\210\310\317\320#\210\310\312#\210\310 \314#\210\310\n\316#\210\310\320#\210\310\f\321#\210\310 \322#\210\207" [pong-left-key pong-right-key pong-up-key pong-down-key pong-quit-key pong-pause-key make-sparse-keymap pong-mode-map define-key [left] pong-move-left [right] pong-move-right [up] pong-move-up [down] pong-move-down pong-quit pong-pause] 5) (#$ . 4093)) #@25 Null map for pong-mode. (defvar pong-null-map (make-sparse-keymap 'pong-null-map) (#$ . 4588)) #@61 Computes display options (required by gamegrid for colors). (defalias 'pong-display-options #[0 "\306\307\310\"\311\211\307W\203A \211U\203 \2028 \nU\203! \2028 \fU\203+ \2028 U\2037 \f\2028 \312I\210\211T\262\202 \210\207" [pong-blank pong-blank-options pong-bat pong-bat-options pong-ball pong-ball-options make-vector 256 nil 0 (nil nil nil) pong-border pong-border-options] 6 (#$ . 4689)]) #@67 Initialize pong buffer and draw stuff thanks to gamegrid library. (defalias 'pong-init-buffer #[0 "\306!\210\307!\210\310 !\210\311\211\312\313 !\210\314\f\315 \\\316#\210\317 \320\211W\203G \f\320\211W\203>