;;; landmark.el --- neural-network robot that learns landmarks
-;; Copyright (C) 1996, 1997, 2000, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004,
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Terrence Brannon (was: <brannon@rana.usc.edu>)
;; Created: December 16, 1996 - first release to usenet
;;;_* Usage
;;; Just type
-;;; M-x eval-current-buffer
+;;; M-x eval-buffer
;;; M-x lm-test-run
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; The board is a rectangular grid. We code empty squares with 0, X's with 1
;; and O's with 6. The rectangle is recorded in a one dimensional vector
;; containing padding squares (coded with -1). These squares allow us to
-;; detect when we are trying to move out of the board. We denote a square by
+;; detect when we are trying to move out of the board. We denote a square by
;; its (X,Y) coords, or by the INDEX corresponding to them in the vector. The
;; leftmost topmost square has coords (1,1) and index lm-board-width + 2.
;; Similarly, vectors between squares may be given by two DX, DY coords or by
(defvar lm-emacs-won ()
"*For making font-lock use the winner's face for the line.")
-(defvar lm-font-lock-face-O
- (if (display-color-p)
- (list (facemenu-get-face 'fg:red) 'bold))
- "*Face to use for Emacs' O.")
+(defface lm-font-lock-face-O '((((class color)) :foreground "red")
+ (t :weight bold))
+ "*Face to use for Emacs' O."
+ :version "22.1"
+ :group 'lm)
-(defvar lm-font-lock-face-X
- (if (display-color-p)
- (list (facemenu-get-face 'fg:green) 'bold))
- "*Face to use for your X.")
+(defface lm-font-lock-face-X '((((class color)) :foreground "green")
+ (t :weight bold))
+ "*Face to use for your X."
+ :version "22.1"
+ :group 'lm)
(defvar lm-font-lock-keywords
- '(("O" . lm-font-lock-face-O)
- ("X" . lm-font-lock-face-X)
+ '(("O" . 'lm-font-lock-face-O)
+ ("X" . 'lm-font-lock-face-X)
("[-|/\\]" 0 (if lm-emacs-won
- lm-font-lock-face-O
- lm-font-lock-face-X)))
+ 'lm-font-lock-face-O
+ 'lm-font-lock-face-X)))
"*Font lock rules for Lm.")
(put 'lm-mode 'front-sticky
"Move point down one row on the Lm board."
(interactive)
(if (< (lm-point-y) lm-board-height)
- (next-line 1)));;; lm-square-height)))
+ (forward-line 1)));;; lm-square-height)))
(defun lm-move-up ()
"Move point up one row on the Lm board."
(interactive)
(if (> (lm-point-y) 1)
- (previous-line lm-square-height)))
+ (forward-line (- lm-square-height))))
(defun lm-move-ne ()
"Move point North East on the Lm board."
;;;_ + Local variables
-;;; The following `outline-layout' local variable setting:
+;;; The following `allout-layout' local variable setting:
;;; - closes all topics from the first topic to just before the third-to-last,
;;; - shows the children of the third to last (config vars)
;;; - and the second to last (code section),
;;; - and closes the last topic (this local-variables section).
;;;Local variables:
-;;;outline-layout: (0 : -1 -1 0)
+;;;allout-layout: (0 : -1 -1 0)
;;;End:
+(random t)
+
(provide 'landmark)
;;; arch-tag: ae5031be-96e6-459e-a3df-1df53117d3f2