diff options
| author | Glenn Morris | 2010-11-02 20:35:38 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-11-02 20:35:38 -0700 |
| commit | 52365e61364fad61094812c86965d6e0bb0faee3 (patch) | |
| tree | 2860be675b5dfb7c5f3735e83854938865f6d54d | |
| parent | cd32f8a9a090943cc94048a2cceac74984154fbb (diff) | |
| download | emacs-52365e61364fad61094812c86965d6e0bb0faee3.tar.gz emacs-52365e61364fad61094812c86965d6e0bb0faee3.zip | |
landmark: you lose.
* lisp/play/landmark.el (lm-losing-threshold): Correct spelling.
(lm-human-plays): Use new name.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/play/landmark.el | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 29a898f6994..d70a55ec02b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2010-11-03 Glenn Morris <rgm@gnu.org> | 1 | 2010-11-03 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * play/landmark.el (lm-losing-threshold): Correct spelling. | ||
| 4 | (lm-human-plays): Use new name. | ||
| 5 | |||
| 3 | * play/gomoku.el (gomoku-loosing-threshold): Correct spelling. | 6 | * play/gomoku.el (gomoku-loosing-threshold): Correct spelling. |
| 4 | (gomoku-human-plays): Use new name. | 7 | (gomoku-human-plays): Use new name. |
| 5 | 8 | ||
diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el index 9cc73960f6b..2902187034a 100644 --- a/lisp/play/landmark.el +++ b/lisp/play/landmark.el | |||
| @@ -282,7 +282,7 @@ is non-nil. One interesting value is `turn-on-font-lock'." | |||
| 282 | ;; its contents as a set, i.e. not considering the order of its elements. The | 282 | ;; its contents as a set, i.e. not considering the order of its elements. The |
| 283 | ;; highest score is given to the "OOOO" qtuples because playing in such a | 283 | ;; highest score is given to the "OOOO" qtuples because playing in such a |
| 284 | ;; qtuple is winning the game. Just after this comes the "XXXX" qtuple because | 284 | ;; qtuple is winning the game. Just after this comes the "XXXX" qtuple because |
| 285 | ;; not playing in it is just loosing the game, and so on. Note that a | 285 | ;; not playing in it is just losing the game, and so on. Note that a |
| 286 | ;; "polluted" qtuple, i.e. one containing at least one X and at least one O, | 286 | ;; "polluted" qtuple, i.e. one containing at least one X and at least one O, |
| 287 | ;; has score zero because there is no more any point in playing in it, from | 287 | ;; has score zero because there is no more any point in playing in it, from |
| 288 | ;; both an attacking and a defending point of view. | 288 | ;; both an attacking and a defending point of view. |
| @@ -352,13 +352,13 @@ is non-nil. One interesting value is `turn-on-font-lock'." | |||
| 352 | ;; qtuple, thus to be a winning move. Similarly, the only way for a square to | 352 | ;; qtuple, thus to be a winning move. Similarly, the only way for a square to |
| 353 | ;; have a score between XXXXscore and OOOOscore is to belong to a "XXXX" | 353 | ;; have a score between XXXXscore and OOOOscore is to belong to a "XXXX" |
| 354 | ;; qtuple. We may use these considerations to detect when a given move is | 354 | ;; qtuple. We may use these considerations to detect when a given move is |
| 355 | ;; winning or loosing. | 355 | ;; winning or losing. |
| 356 | 356 | ||
| 357 | (defconst lm-winning-threshold | 357 | (defconst lm-winning-threshold |
| 358 | (aref lm-score-trans-table (+ 6 6 6 6)) ;; OOOOscore | 358 | (aref lm-score-trans-table (+ 6 6 6 6)) ;; OOOOscore |
| 359 | "Threshold score beyond which an Emacs move is winning.") | 359 | "Threshold score beyond which an Emacs move is winning.") |
| 360 | 360 | ||
| 361 | (defconst lm-loosing-threshold | 361 | (defconst lm-losing-threshold |
| 362 | (aref lm-score-trans-table (+ 1 1 1 1)) ;; XXXXscore | 362 | (aref lm-score-trans-table (+ 1 1 1 1)) ;; XXXXscore |
| 363 | "Threshold score beyond which a human move is winning.") | 363 | "Threshold score beyond which a human move is winning.") |
| 364 | 364 | ||
| @@ -771,7 +771,7 @@ If the game is finished, this command requests for another game." | |||
| 771 | (t | 771 | (t |
| 772 | (setq score (aref lm-score-table square)) | 772 | (setq score (aref lm-score-table square)) |
| 773 | (lm-play-move square 1) | 773 | (lm-play-move square 1) |
| 774 | (cond ((and (>= score lm-loosing-threshold) | 774 | (cond ((and (>= score lm-losing-threshold) |
| 775 | ;; Just testing SCORE > THRESHOLD is not enough for | 775 | ;; Just testing SCORE > THRESHOLD is not enough for |
| 776 | ;; detecting wins, it just gives an indication that | 776 | ;; detecting wins, it just gives an indication that |
| 777 | ;; we confirm with LM-FIND-FILLED-QTUPLE. | 777 | ;; we confirm with LM-FIND-FILLED-QTUPLE. |