aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPavel Janík2001-11-10 08:14:13 +0000
committerPavel Janík2001-11-10 08:14:13 +0000
commit0017164551bb91a16fc1411480ebeee21d2a547c (patch)
tree71316a4f44eda7088541feea5ee52d00831931a6 /lisp
parent0dd10e625589b0e5015316474e0d7ba2036c9801 (diff)
downloademacs-0017164551bb91a16fc1411480ebeee21d2a547c.tar.gz
emacs-0017164551bb91a16fc1411480ebeee21d2a547c.zip
Move definitions of constants to the beginning of file, before their use.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/play/gomoku.el36
1 files changed, 20 insertions, 16 deletions
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el
index fef7546760f..7b2a9bd42d9 100644
--- a/lisp/play/gomoku.el
+++ b/lisp/play/gomoku.el
@@ -80,6 +80,26 @@ One useful value to include is `turn-on-font-lock' to highlight the pieces."
80 :type 'hook 80 :type 'hook
81 :group 'gomoku) 81 :group 'gomoku)
82 82
83;;;
84;;; CONSTANTS FOR BOARD
85;;;
86
87;; You may change these values if you have a small screen or if the squares
88;; look rectangular, but spacings SHOULD be at least 2 (MUST BE at least 1).
89
90(defconst gomoku-square-width 4
91 "*Horizontal spacing between squares on the Gomoku board.")
92
93(defconst gomoku-square-height 2
94 "*Vertical spacing between squares on the Gomoku board.")
95
96(defconst gomoku-x-offset 3
97 "*Number of columns between the Gomoku board and the side of the window.")
98
99(defconst gomoku-y-offset 1
100 "*Number of lines between the Gomoku board and the top of the window.")
101
102
83(defvar gomoku-mode-map nil 103(defvar gomoku-mode-map nil
84 "Local keymap to use in Gomoku mode.") 104 "Local keymap to use in Gomoku mode.")
85 105
@@ -927,22 +947,6 @@ If the game is finished, this command requests for another game."
927;;; DISPLAYING THE BOARD. 947;;; DISPLAYING THE BOARD.
928;;; 948;;;
929 949
930;; You may change these values if you have a small screen or if the squares
931;; look rectangular, but spacings SHOULD be at least 2 (MUST BE at least 1).
932
933(defconst gomoku-square-width 4
934 "*Horizontal spacing between squares on the Gomoku board.")
935
936(defconst gomoku-square-height 2
937 "*Vertical spacing between squares on the Gomoku board.")
938
939(defconst gomoku-x-offset 3
940 "*Number of columns between the Gomoku board and the side of the window.")
941
942(defconst gomoku-y-offset 1
943 "*Number of lines between the Gomoku board and the top of the window.")
944
945
946(defun gomoku-max-width () 950(defun gomoku-max-width ()
947 "Largest possible board width for the current window." 951 "Largest possible board width for the current window."
948 (1+ (/ (- (window-width (selected-window)) 952 (1+ (/ (- (window-width (selected-window))