80 |
:type 'hook |
:type 'hook |
81 |
:group 'gomoku) |
:group 'gomoku) |
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 |
|
|
103 |
(defvar gomoku-mode-map nil |
(defvar gomoku-mode-map nil |
104 |
"Local keymap to use in Gomoku mode.") |
"Local keymap to use in Gomoku mode.") |
105 |
|
|
947 |
;;; DISPLAYING THE BOARD. |
;;; DISPLAYING THE BOARD. |
948 |
;;; |
;;; |
949 |
|
|
|
;; You may change these values if you have a small screen or if the squares |
|
|
;; look rectangular, but spacings SHOULD be at least 2 (MUST BE at least 1). |
|
|
|
|
|
(defconst gomoku-square-width 4 |
|
|
"*Horizontal spacing between squares on the Gomoku board.") |
|
|
|
|
|
(defconst gomoku-square-height 2 |
|
|
"*Vertical spacing between squares on the Gomoku board.") |
|
|
|
|
|
(defconst gomoku-x-offset 3 |
|
|
"*Number of columns between the Gomoku board and the side of the window.") |
|
|
|
|
|
(defconst gomoku-y-offset 1 |
|
|
"*Number of lines between the Gomoku board and the top of the window.") |
|
|
|
|
|
|
|
950 |
(defun gomoku-max-width () |
(defun gomoku-max-width () |
951 |
"Largest possible board width for the current window." |
"Largest possible board width for the current window." |
952 |
(1+ (/ (- (window-width (selected-window)) |
(1+ (/ (- (window-width (selected-window)) |